/* ninhbinh.info -- interactive map (/map). Mobile first. */

.map-body { overscroll-behavior-y: none; }
.map-body .site-header .nav { height: 56px; }
.map-body .nav-links { top: 56px; }

.map-app {
  display: flex; flex-direction: column;
  height: calc(100vh - 56px);
  height: calc(100dvh - 56px);
  min-height: 420px;
  background: var(--cream-2);
}

/* toolbar with filter chips */
.map-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; background: var(--cream); border-bottom: 1px solid var(--line);
}
.chips {
  display: flex; gap: 6px; overflow-x: auto; flex: 1; min-width: 0;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 11px; font: 600 .86rem var(--sans); cursor: pointer;
  white-space: nowrap; transition: background .12s, color .12s, border-color .12s;
}
.chip.on { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.chip-ic { font-size: .95rem; line-height: 1; }
.tb-btn {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--green-700); background: #fff; color: var(--green-800);
  border-radius: 999px; padding: 6px 12px; font: 700 .86rem var(--sans); cursor: pointer;
}
.tb-btn[aria-pressed="true"] { background: var(--green-700); color: #fff; }

[hidden] { display: none !important; }

/* stage */
.map-stage { position: relative; flex: 1; min-height: 0; }
#map { position: absolute; inset: 0; background: #e9e4d6; }
.leaflet-container { font-family: var(--sans); }
.leaflet-control-attribution { font-size: 10px; opacity: .85; }
.leaflet-touch .leaflet-bar a { width: 36px; height: 36px; line-height: 36px; }

/* pins */
.pin-wrap { background: none; border: none; }
.pin {
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  border: 2.5px solid var(--green-700); box-shadow: 0 2px 8px rgba(20,57,42,.28);
  display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1;
  transition: transform .1s;
}
.pin:hover { transform: scale(1.08); }
.pin-eat { border-color: #c2542f; }
.pin-stay { border-color: #7a5aa0; }
.pin-relax { border-color: #b8477f; }
.pin-practical { border-color: #5a6b7a; background: #f4f6f8; width: 32px; height: 32px; font-size: 16px; }
.pin-rec { border-color: var(--gold-500); border-width: 3px; background: #fff8ea; }
.me-wrap { background: none; border: none; }
.me-dot {
  width: 18px; height: 18px; border-radius: 50%; background: #2a7fff; border: 3px solid #fff;
  box-shadow: 0 0 0 2px #2a7fff, 0 2px 8px rgba(0,0,0,.35);
}

/* floating buttons */
.fab {
  position: absolute; right: 12px; bottom: 74px; z-index: 1050;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: #fff; color: var(--green-800); box-shadow: 0 3px 12px rgba(20,57,42,.3);
  display: flex; align-items: center; justify-content: center;
}
.fab.active { color: #2a7fff; }
.fab.busy { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .5; } }
.lucy-btn {
  position: absolute; right: 12px; bottom: 16px; z-index: 1050;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-500); color: #fff; border: none; cursor: pointer;
  border-radius: 999px; padding: 11px 16px 11px 14px; font: 700 .95rem var(--sans);
  box-shadow: 0 4px 14px rgba(185,128,47,.45);
}
.lucy-btn:hover { background: var(--gold-600); }
.map-stage.sheet-open .fab, .map-stage.sheet-open .lucy-btn,
.map-stage.list-open .fab, .map-stage.list-open .lucy-btn { display: none; }

/* hide the chat widget's own bubble: the map has its own Ask Lucy button */
#nbtc-chat-bubble, #nbtc-chat-badge { display: none !important; }

/* bottom sheet */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1100;
  background: #fff; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 30px rgba(20,57,42,.22);
  max-height: 68%; overflow-y: auto; padding: 8px 18px 22px;
  animation: slideup .18s ease-out;
}
@keyframes slideup { from { transform: translateY(24px); opacity: .6; } }
.sheet-handle { width: 42px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 10px; }
.icon-btn {
  border: none; background: var(--cream-2); color: var(--ink); width: 34px; height: 34px;
  border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer;
}
.sheet-close { position: absolute; top: 12px; right: 12px; }
.sheet-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin: 4px 0 12px; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; font-size: .82rem; }
.tag-cat { color: var(--ink-soft); font-weight: 600; }
.rec-badge {
  display: inline-block; background: var(--gold-100); color: var(--gold-600);
  font-weight: 700; font-size: .74rem; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.sheet h2 { margin: 0 0 6px; font-size: 1.45rem; padding-right: 36px; }
.sheet p { margin: 0 0 10px; font-size: .98rem; line-height: 1.5; }
.info-rows { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: .9rem; margin: 0 0 12px; }
.info-rows dt { color: var(--ink-soft); font-weight: 600; margin: 0; }
.info-rows dd { margin: 0; }
.sheet .btn-row { gap: 8px; }
.sheet .btn { padding: 10px 15px; font-size: .92rem; }
.btn-green { background: var(--green-700); color: #fff; }
.btn-green:hover { background: var(--green-800); color: #fff; }
.sheet-foot { margin-top: 12px; font-size: .84rem; color: var(--ink-soft); }
.linklike {
  background: none; border: none; padding: 0; font: inherit; color: var(--green-700);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.linklike:hover { color: var(--gold-600); }

/* list panel */
.panel {
  position: absolute; inset: 0; z-index: 1150; background: var(--cream);
  display: flex; flex-direction: column;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fff;
}
.panel-body { overflow-y: auto; flex: 1; padding: 6px 0 20px; }
.list-item {
  display: flex; gap: 12px; align-items: center; width: 100%; text-align: left;
  background: #fff; border: none; border-bottom: 1px solid var(--line);
  padding: 11px 14px; cursor: pointer; font: inherit; color: var(--ink);
}
.list-item:hover { background: var(--green-100); }
.list-ic { flex: 0 0 34px; height: 34px; width: 34px; border-radius: 50%; background: var(--cream-2);
  display: flex; align-items: center; justify-content: center; font-size: 17px; }
.list-item.rec .list-ic { background: var(--gold-100); }
.list-main { flex: 1; min-width: 0; }
.list-name { font-weight: 700; display: block; }
.list-sub { font-size: .82rem; color: var(--ink-soft); }
.list-dist { flex: 0 0 auto; font-weight: 700; color: var(--green-700); font-size: .9rem; }
.list-note { padding: 10px 14px; font-size: .86rem; color: var(--ink-soft); }

/* nudge (small, dismissible, once per session) */
.nudge {
  position: absolute; top: 10px; left: 10px; right: 58px; z-index: 1200;
  background: var(--green-900); color: #f3f1e7; border-radius: 12px; padding: 10px 40px 10px 14px;
  font-size: .9rem; line-height: 1.4; box-shadow: 0 6px 20px rgba(20,57,42,.35);
  animation: slideup .2s ease-out;
}
.nudge a { color: var(--gold-100); font-weight: 700; }
.nudge .icon-btn { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; font-size: 18px; background: rgba(255,255,255,.12); color: #fff; }

/* content below the map */
.map-intro { padding: 30px 0 40px; background: var(--cream); }
.map-intro h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.map-intro h3 { margin-top: 1.4em; }
.place-list { list-style: none; padding: 0; margin: 0 0 1em; }
.place-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.place-links a { margin-right: 2px; }
.muted { color: var(--ink-soft); }

/* desktop: sheet and list as a side card */
@media (min-width: 900px) {
  .sheet { left: 16px; right: auto; bottom: 16px; width: 440px; border-radius: 16px; max-height: calc(100% - 32px); padding-top: 14px; }
  .sheet-handle { display: none; }
  .panel { inset: auto auto 16px 16px; width: 440px; height: calc(100% - 32px); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
  .nudge { left: auto; right: 66px; width: 380px; top: 12px; }
  .map-stage.sheet-open .fab, .map-stage.sheet-open .lucy-btn,
  .map-stage.list-open .fab, .map-stage.list-open .lucy-btn { display: inline-flex; }
  .map-app { height: calc(100vh - 56px); }
}
