/* Vegas Map v2 — Light & Happy color system */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Vivid layer colors — pop on light map background */
  --col-hotel:  #0284C7;   /* sky blue — hotel buildings */
  --col-venue:  #7C3AED;   /* vivid purple — venues */
  --col-poker:  #16A34A;   /* vivid green — poker rooms */
  --col-event:  #8B5CF6;   /* vivid purple — TM events */
  --col-wsop:   #D97706;   /* amber — WSOP/gold */
  --col-transit:#0284C7;   /* deep sky — transit */
  --col-race:   #E11D48;   /* rose red */

  /* Light backgrounds */
  --bg:         #F5F0EA;   /* warm cream */
  --surface:    #FFFFFF;
  --bg-2:       #EDE8E1;
  --bg-3:       #DDD8D0;

  /* Aliases */
  --accent:     #0284C7;
  --gold:       var(--col-wsop);
  --green:      var(--col-poker);

  /* Dark text on light background */
  --text:       #1C1917;
  --text-muted: #78716C;
  --text-dim:   #A8A29E;

  --border:     rgba(0,0,0,0.10);
  --safe-b:     env(safe-area-inset-bottom, 0px);
  --safe-t:     env(safe-area-inset-top, 0px);
  --rail-h:     104px;   /* real hotel-rail height (card + padding); bottom controls anchor to this */
  --wep-peek-h: 68px;    /* WSOP events panel peek height (see index.html #wsop-events-panel.wep-peek) */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
}

html, body { height: 100%; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; overflow: hidden; }

/* Header — safe-area-inset-top pads header on notched iPhones (black-translucent status bar) */
#vnm-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: calc(44px + var(--safe-t, 0px));
  padding-top: var(--safe-t, 0px);
  background: rgba(245,240,234,0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding-left: 12px; padding-right: 12px;
}
.vnm-wordmark { display: flex; gap: 4px; text-decoration: none; font-weight: 700; font-size: 15px; }
.vnm-wordmark-city  { color: var(--accent); }
.vnm-wordmark-brand { color: var(--text); }
.vnm-live-badge { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.vnm-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* Main + map */
#vnm-main { position: fixed; inset: calc(44px + var(--safe-t, 0px)) 0 0; }
#map { position: absolute; inset: 0; }

/* Prevent Android text-selection popup when tapping map */
#vnm-main, #map, .maplibregl-canvas-container, .maplibregl-canvas {
  -webkit-user-select: none;
  user-select: none;
}

/* Trip chips bar */
/* Centered, horizontally scrollable. On phones it is width-capped (see media
   query below) so its right edge can never slide under the top-right cluster
   (#layer-panel-btn + #mode-bar). */
#trip-chips-bar {
  position: absolute; top: calc(8px + var(--safe-t, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 0 8px; z-index: 100;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
#trip-chips-bar::-webkit-scrollbar { display: none; }
.trip-chip {
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: rgba(245,240,234,0.88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text-muted); font-size: 12px; cursor: pointer; white-space: nowrap;
  transition: all .2s;
}
.trip-chip:hover, .trip-chip.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.trip-chip[data-trip="wsop"].active { background: var(--gold); border-color: var(--gold); }
.trip-chip[data-trip="poker"].active { background: var(--green); border-color: var(--green); }

/* Hotel rail */
#hotel-rail-bar {
  position: absolute; bottom: calc(0px + var(--safe-b)); left: 0; right: 0; z-index: 200;
  background: rgba(245,240,234,0.95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid var(--border); padding: 8px 0;
  transform: translateY(100%); transition: transform .3s ease;
}
#hotel-rail-bar.is-visible { transform: translateY(0); }
#hotel-rail-cards { display: flex; gap: 8px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#hotel-rail-cards::-webkit-scrollbar { display: none; }
.hrl-card {
  flex-shrink: 0; width: 140px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px; cursor: pointer; transition: border-color .2s;
}
.hrl-card:hover { border-color: var(--accent); }
.hrl-name  { font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hrl-price { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 3px; }
.hrl-resort { display: block; font-size: 10px; font-weight: 400; color: var(--text-muted); }
.hrl-dist  { font-size: 10px; color: var(--text-muted); }
.hrl-meta  { font-size: 11px; font-weight: 400; color: var(--text-muted); }

/* ── Bottom-right control stack (Find Food on top, Add dates below) ───────────
   Both buttons share ONE bottom anchor (--bottom-clear) so they never collide
   with each other, the hotel rail, the WSOP peek panel, or the poker rail.
   --bottom-clear is recomputed by body-class / :has() rules below as obstructions
   appear, so the buttons always float just above the tallest bottom UI. */
:root {
  --bottom-gap:   12px;  /* gap above the tallest bottom obstruction */
  --bottom-clear: calc(var(--bottom-gap) + var(--safe-b));  /* default: nothing open */
}
/* Hotel rail visible → clear the rail. :has() is supported on all current mobile
   browsers; the body-class rules below cover WSOP/poker without :has(). */
body:has(#hotel-rail-bar.is-visible) {
  --bottom-clear: calc(var(--rail-h) + var(--bottom-gap) + var(--safe-b));
}
/* WSOP events panel peeking → clear its 68px peek bar. */
body.wep-open {
  --bottom-clear: calc(var(--wep-peek-h) + var(--bottom-gap) + var(--safe-b));
}
/* Hotel rail AND WSOP peek both up → clear the taller of the two (stacked). */
body.wep-open:has(#hotel-rail-bar.is-visible) {
  --bottom-clear: calc(var(--rail-h) + var(--wep-peek-h) + var(--bottom-gap) + var(--safe-b));
}

/* Date bar chip — bottom of the stack */
#date-bar-chip {
  position: absolute; bottom: var(--bottom-clear); right: 12px; z-index: 460;
}
#date-bar-chip button {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: rgba(245,240,234,0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font-size: 12px; cursor: pointer;
}

/* Date nudge — orange banner drops from top, impossible to miss */
@keyframes vnm-banner-drop {
  from { transform: translateX(-50%) translateY(-70px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0);    opacity: 1; }
}
@keyframes vnm-banner-rise {
  from { transform: translateX(-50%) translateY(0);    opacity: 1; }
  to   { transform: translateX(-50%) translateY(-70px); opacity: 0; }
}
@keyframes vnm-banner-pulse {
  0%,100% { box-shadow: 0 6px 20px rgba(249,115,22,0.45); }
  50%      { box-shadow: 0 6px 28px rgba(249,115,22,0.75), 0 0 0 5px rgba(249,115,22,0.18); }
}
#date-nudge-banner {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%) translateY(-70px);  /* starts hidden above */
  z-index: 600;
  background: #f97316; color: #fff;
  font-size: 14px; font-weight: 800;
  padding: 11px 22px;
  border-radius: 28px;
  box-shadow: 0 6px 20px rgba(249,115,22,0.45);
  white-space: nowrap; cursor: pointer;
  pointer-events: all;
  -webkit-tap-highlight-color: transparent;
  animation:
    vnm-banner-drop 0.45s cubic-bezier(.34,1.56,.64,1) 1.2s forwards,
    vnm-banner-pulse 2s ease 2.5s infinite;
}
#date-nudge-banner.is-dismissing {
  animation: vnm-banner-rise 0.28s ease forwards !important;
}
/* Subtle chip glow so user knows where to tap again */
#date-bar-chip.is-nudging button {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.25);
}

/* Mobile bottom sheet */
#mobile-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 300;
  background: var(--surface); border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
#mobile-sheet[data-state="peek"]  { transform: translateY(calc(100% - calc(100px + var(--safe-b)))); }
#mobile-sheet[data-state="half"]  { transform: translateY(40%); }
#mobile-sheet[data-state="full"]  { transform: translateY(0); }
.sheet-handle-pill { width: 36px; height: 4px; border-radius: 2px; background: rgba(0,0,0,0.15); margin: 8px auto 4px; }
#sheet-drag-handle { padding: 4px 0; cursor: grab; }
#sheet-peek-content { padding: 0 12px 8px; }
#sheet-trip-chips-mobile { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
#sheet-trip-chips-mobile::-webkit-scrollbar { display: none; }
#sheet-body { padding: 0 12px 12px; overflow-y: auto; max-height: 50vh; max-height: 50dvh; -webkit-overflow-scrolling: touch; }
.sheet-placeholder { color: var(--text-muted); font-size: 13px; text-align: center; padding: 24px 0; }

/* Scrim — dark backdrop behind any open detail drawer */
#detail-scrim {
  position: absolute; inset: 0; z-index: 340;
  background: rgba(0,0,0,0.45);
  display: none; cursor: pointer;
}
body.hdb-open #detail-scrim,
body.pdb-open #detail-scrim { display: block; }

/* Hide competing bottom UI when a drawer is open */
body.hdb-open #hotel-rail-bar,
body.pdb-open #hotel-rail-bar { transform: translateY(100%) !important; }
body.hdb-open #mobile-sheet,
body.pdb-open #mobile-sheet   { transform: translateY(110%) !important; }
body.hdb-open #date-bar-chip,
body.pdb-open #date-bar-chip,
body.hdb-open #food-search-btn,
body.pdb-open #food-search-btn  { display: none; }
/* WSOP panel fully expanded → hide the bottom-right stack so it doesn't sit on
   top of the open schedule. (Peek state keeps them visible, lifted above it.) */
body.wep-expanded #date-bar-chip,
body.wep-expanded #food-search-btn { display: none; }

/* Poker detail drawer */
#poker-detail-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 360;
  background: #fff; border-radius: 20px 20px 0 0;
  border-top: 3px solid var(--green);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 85vh; max-height: 85dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#poker-detail-bar.is-open { transform: translateY(0); }
/* Safe-area bottom padding so content clears iPhone home bar */
#poker-detail-bar > div { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }

/* Hotel detail drawer */
#hotel-detail-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 360;
  background: #fff; border-radius: 20px 20px 0 0;
  border-top: 3px solid var(--accent);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
  transform: translateY(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 85vh; max-height: 85dvh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#hotel-detail-bar.is-open { transform: translateY(0); }
#hotel-detail-bar > div { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }

/* Close button — 44×44 tap target minimum for mobile */
.drawer-close-btn {
  position: absolute; top: 12px; right: 12px;
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.07); color: #64748b;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  /* Prevent this button from being covered by scroll content */
  z-index: 2; flex-shrink: 0;
  touch-action: manipulation;
}
.drawer-close-btn:active { background: rgba(0,0,0,0.18); }

/* WSOP countdown pill */
#wsop-pill {
  position: absolute; top: 52px; left: 50%; transform: translateX(-50%);
  background: rgba(245,158,11,0.15); border: 1px solid var(--gold);
  border-radius: 20px; padding: 4px 12px; font-size: 11px; color: var(--gold);
  z-index: 150; white-space: nowrap;
}

/* Layer panel — round icon button (top-right) opens a right-edge side panel */
/* top was 52px; bumped to 56px so nav overflow (~71px bottom) never occludes the button center (76px) */
#layer-panel-btn {
  position: fixed; top: calc(56px + var(--safe-t, 0px)); right: 12px; z-index: 301;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(245,240,234,0.92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--text); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#layer-panel {
  position: fixed; top: calc(44px + var(--safe-t, 0px)); right: 0; bottom: 0;
  width: min(290px, 82vw);
  transform: translateX(100%); transition: transform .28s ease;
  display: block;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -4px 0 18px rgba(0,0,0,.18);
  padding: 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; z-index: 300;
}
#layer-panel.is-open { transform: translateX(0); }
/* Side-panel header (title + close) */
.layer-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.layer-panel-title { font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: .02em; }
.layer-panel-close {
  background: none; border: none; color: var(--text-muted); font-size: 16px;
  line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.layer-panel-close:hover { color: var(--text); background: rgba(0,0,0,0.05); }
#layer-panel::-webkit-scrollbar { width: 4px; }
#layer-panel::-webkit-scrollbar-track { background: transparent; }
#layer-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.layer-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.layer-row:hover { background: rgba(255,255,255,.05); }
.layer-label { font-size: 12px; color: var(--text); }
.layer-toggle { width: 32px; height: 18px; border-radius: 9px; border: none; cursor: pointer; transition: background .2s; }
.layer-toggle.on  { background: var(--accent); }
.layer-toggle.off { background: rgba(0,0,0,0.15); }
.layer-group-header { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 8px 8px 4px; }

/* ── Layer panel help button ── */
.layer-help-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted); font-size: 12px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 1;
}
.layer-help-btn:hover { background: rgba(0,0,0,0.06); color: var(--text); }

/* ── Feature guide modal ── */
.mfg-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 10000; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.mfg-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; width: 100%; max-width: 400px;
  max-height: 82vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
}
.mfg-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.mfg-title { font-size: 15px; font-weight: 700; color: var(--text); }
.mfg-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; padding: 4px 6px; border-radius: 6px; line-height: 1;
}
.mfg-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.mfg-body { padding: 4px 0 8px; }
.mfg-section { padding: 10px 18px; border-bottom: 1px solid var(--border); }
.mfg-section:last-of-type { border-bottom: none; }
.mfg-section-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.mfg-section p { font-size: 12px; color: var(--text-muted); line-height: 1.55; margin: 0; }
.mfg-footer { padding: 12px 18px; text-align: center; border-top: 1px solid var(--border); }
.mfg-footer a { font-size: 12px; color: var(--accent); text-decoration: none; }
.mfg-footer a:hover { text-decoration: underline; }

/* ── Map-mode bar (SEGMENTED Flat/3D + Map/Secret toggles) ───────────────── */
/* Top-right vertical stack, just below the layers icon button (#layer-panel-btn
   top ~52px, 40px tall → bottom ~92px). Clears the crowded bottom UI on mobile.
   Each control is a SEGMENTED toggle: a pill-shaped container split into two
   equal halves. The ACTIVE half is gold-filled (white text); the inactive half
   is transparent + muted text. Both toggles are an EQUAL-WIDTH matched pair —
   the bar has a fixed width and each toggle is width:100%. The gold-filled
   segment unambiguously signals the CURRENT mode. */

/* ── MODE CONTROLS ─────────────────────────────────────────────────────────── */
:root {
  --mode-pill-h:  36px;
  --mode-pill-fs: 12px;
  --mode-pill-r:  18px;
}

/* Flat/3D: single small icon button below #layer-panel-btn (top-right).
   Shows what mode you'd switch TO — Google Maps convention. */
#mode-dim-btn {
  position: absolute;
  top: calc(104px + var(--safe-t, 0px));  /* below layers button */
  right: 12px;
  z-index: 201;
  width: 44px; height: 36px;
  border-radius: 8px;
  background: rgba(245,240,234,0.95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  color: var(--text);
  font-size: 11px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s;
}
#mode-dim-btn:active { background: var(--gold); color: #fff; }

/* Segmented toggle — reusable for Map/Secret pill. */
.mode-seg {
  display: flex;
  height: var(--mode-pill-h);
  border-radius: var(--mode-pill-r);
  border: 1px solid var(--border);
  background: rgba(245,240,234,0.95);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.mode-seg-btn {
  flex: 1 1 0; min-width: 0; height: 100%;
  padding: 0 8px; border: none; background: transparent;
  color: var(--text-muted);
  font-size: var(--mode-pill-fs); font-weight: 600; line-height: 1;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  white-space: nowrap; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s, color .18s;
}
.mode-seg-btn.is-active { background: var(--gold); color: #fff; }

/* Map/Secret: small pill, bottom-left. Hidden when hotel/poker drawer is open
   (they render their own mode switcher inside the drawer content). */
#mode-detail-bar {
  position: absolute;
  bottom: var(--bottom-clear);
  left: 12px;
  z-index: 460;
}
body.hdb-open #mode-detail-bar,

/* Desktop */
@media (min-width: 1024px) {
  #mobile-sheet { display: none; }
  #trip-chips-bar { left: 12px; transform: none; }
}
/* Mobile: top trip-chips hidden — bottom-sheet chips replace them */
@media (max-width: 1023px) {
  #trip-chips-bar { display: none; }
}

/* ── Food search ─────────────────────────────────────────────────────────── */
/* Sits directly ABOVE #date-bar-chip in the bottom-right stack: same anchor
   (--bottom-clear) + the date chip's height + a gap so they never overlap. */
#food-search-btn {
  position: absolute;
  bottom: calc(var(--bottom-clear) + 37px + 10px);  /* above the Add-dates chip */
  right: 12px;
  z-index: 460;
  padding: 9px 14px;
  border-radius: 20px;
  border: 1px solid rgba(251,146,60,0.5);
  background: rgba(14,21,32,0.88);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fb923c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
#food-search-btn:hover {
  background: rgba(251,146,60,0.15);
  border-color: #fb923c;
}
#food-search-btn:disabled { opacity: 0.6; cursor: wait; }

#food-results-panel {
  padding: 8px 0;
  max-height: 50vh;
  max-height: 50dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Custom map welcome banner ───────────────────────────────────────────── */
#map-welcome-banner {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 450;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: rgba(255,255,255,0.97);
  border: 1px solid rgba(45,212,191,0.4);
  border-radius: 10px;
  padding: 10px 36px 10px 14px;
  max-width: min(340px, calc(100vw - 24px));
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
}
#map-welcome-title {
  font-size: 13px;
  font-weight: 700;
  color: #2dd4bf;
}
#map-welcome-note {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}
#map-welcome-dismiss {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  padding: 2px;
}
#map-welcome-dismiss:hover { color: #475569; }

/* ── Share button (in layer panel) ──────────────────────────────────────── */
.layer-share-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 8px 8px 4px;
  padding: 7px 0;
  background: rgba(45,212,191,0.10);
  border: 1px solid rgba(45,212,191,0.35);
  border-radius: 6px;
  color: #2dd4bf;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.layer-share-btn:hover { background: rgba(45,212,191,0.20); }
.layer-share-btn.copied { color: #10b981; border-color: rgba(16,185,129,0.5); }

/* ── Save Map button (in layer panel, shown only when MAP_SAVE_ENABLED) ─── */
.layer-save-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 4px 8px 6px;
  padding: 7px 0;
  background: rgba(14,165,233,0.12);
  border: 1px solid rgba(14,165,233,0.40);
  border-radius: 6px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s;
}
.layer-save-btn:hover { background: rgba(14,165,233,0.22); }

/* ── 3D pitch control buttons ────────────────────────────────────────────── */
.vnm-pitch-ctrl { overflow: hidden; }
.vnm-pc-btn {
  display: block;
  width: 29px;
  height: 29px;
  background: #fff;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  cursor: pointer;
  font-size: 13px;
  line-height: 29px;
  text-align: center;
  padding: 0;
  transition: background .15s;
}
.vnm-pc-btn:last-child { border-bottom: none; }
.vnm-pc-btn:hover { background: #f0f0f0; }

/* ── Floor plan overlay sub-panel controls ───────────────────────────────── */
.layer-subpanel {
  padding: 6px 10px 8px 28px;
  background: rgba(0,0,0,0.03);
  border-left: 2px solid rgba(45,212,191,0.25);
  margin: 0 0 4px 0;
}
.ov-variants {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ov-variant-opt {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: #475569;
  cursor: pointer;
}
.ov-variant-opt input { cursor: pointer; accent-color: #2dd4bf; }
.ov-opacity-row { display: flex; flex-direction: column; gap: 4px; }
.ov-opacity-label { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.ov-opacity-presets { display: flex; gap: 4px; }
.ov-preset {
  flex: 1;
  padding: 3px 0;
  font-size: 10px;
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  cursor: pointer;
  color: #475569;
  transition: background .15s;
}
.ov-preset.active, .ov-preset:hover {
  background: rgba(45,212,191,0.15);
  border-color: rgba(45,212,191,0.4);
  color: #2dd4bf;
}
.ov-opacity-slider {
  accent-color: #2dd4bf;
  cursor: pointer;
}

/* ── Universal search ── */
#vnm-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
#vnm-search-btn:hover { background: rgba(255,255,255,0.1); }

#vnm-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(28,25,23,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#vnm-search-bar {
  position: fixed;
  top: calc(8px + var(--safe-t, 0px));
  left: 8px;
  right: 8px;
  background: var(--surface, #1e293b);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  padding: 6px 10px;
  gap: 8px;
  z-index: 601;
}

#vnm-search-input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px; /* 16px = no iOS auto-zoom */
  color: var(--text, #f8fafc);
  outline: none;
  min-width: 0;
}
#vnm-search-input::placeholder { color: rgba(248,250,252,0.45); }
#vnm-search-input::-webkit-search-cancel-button { display: none; }

#vnm-search-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text, #f8fafc);
  opacity: 0.65;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
#vnm-search-close:hover { opacity: 1; }

#vnm-search-results {
  position: fixed;
  top: calc(62px + var(--safe-t, 0px));
  left: 8px;
  right: 8px;
  max-height: 55vh;
  max-height: 55dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface, #1e293b);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 601;
}

.vsr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  min-height: 44px; /* iOS tap target */
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.vsr-row:last-child { border-bottom: none; }
.vsr-row:hover, .vsr-row:focus { background: rgba(255,255,255,0.07); outline: none; }
.vsr-row.vsr-empty { cursor: default; color: rgba(248,250,252,0.45); font-size: 13px; }
.vsr-row.vsr-empty:hover { background: none; }

.vsr-icon { font-size: 16px; flex-shrink: 0; }
.vsr-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vsr-label { font-size: 14px; font-weight: 600; color: var(--text, #f8fafc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vsr-sub { font-size: 12px; color: rgba(248,250,252,0.55); }

/* Hide competing bottom widgets while search is open */
body.vnm-search-open #hotel-rail-bar,
body.vnm-search-open #trip-chips-bar,
body.vnm-search-open #food-search-btn,
body.vnm-search-open #date-bar-chip { display: none !important; }
body.vnm-search-open #mobile-sheet { transform: translateY(110%) !important; }

/* Date quick-select chips inside date picker popup */
.date-quick-chips {
  display: flex;
  gap: 8px;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 0;
}
.dqc {
  background: rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 20px;
  color: #1C1917;
  font-size: 13px;
  padding: 5px 14px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
}
.dqc:hover { background: rgba(249,115,22,0.12); border-color: #F97316; color: #F97316; }

/* Hotel drawer enrichment */
#hdb-enrichment { padding: 0 16px; margin-bottom: 8px; }
.hdb-review { font-size: 13px; color: var(--text, #1C1917); margin-bottom: 6px; }
.hdb-facilities { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.hdb-facility {
  background: rgba(2,132,199,0.10);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 12px;
  color: #1C1917;
}
.hdb-checkin { font-size: 12px; color: #64748b; margin-bottom: 4px; }

/* Walk time — hotel drawer + callout card */
.hdb-walktime {
  font-size: 12px;
  color: #64748b;
  padding: 0 0 6px;
  margin-bottom: 2px;
}
.vc-walk {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
  display: inline-block;
}

/* Save to Trip button */
.vnm-save-pin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(248,250,252,0.08);
  border: 1px solid rgba(248,250,252,0.18);
  border-radius: 20px;
  color: rgba(248,250,252,0.75);
  font-size: 13px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s;
  margin: 8px 16px 4px;
  font-family: inherit;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.vnm-save-pin:hover { background: rgba(248,250,252,0.15); border-color: rgba(248,250,252,0.3); }
.vnm-save-pin.pin-saved { border-color: #f43f5e; color: #f43f5e; background: rgba(244,63,94,0.08); }
.vnm-save-pin.pin-saved:hover { background: rgba(244,63,94,0.16); }
/* In callout (light background) */
#vnm-callout .vnm-save-pin {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.14);
  color: #475569;
  margin: 8px 0 0;
  width: 100%;
  justify-content: center;
}
#vnm-callout .vnm-save-pin:hover { background: rgba(0,0,0,0.08); }

/* ── Nearby section (hotel drawer) ── */
.hdb-nearby { padding: 12px 16px 0; border-top: 1px solid rgba(0,0,0,0.08); margin-top: 8px; }
.hdb-nearby-header { font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.hdb-nearby-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; text-decoration: none; color: #334155; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,0.06); }
.hdb-nearby-row:last-child { border-bottom: none; }
.hdb-nearby-icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.hdb-nearby-name { flex: 1; font-weight: 500; }
.hdb-nearby-dist { font-size: 11px; color: #94a3b8; white-space: nowrap; }

/* ── Post-booking return panel ── */
.booking-return-panel {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: #0f172a; border: 1px solid rgba(248,250,252,0.15);
  border-radius: 16px; padding: 16px 20px; width: calc(100% - 32px); max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5); z-index: 9000;
  animation: brpSlideUp 0.3s ease;
}
.brp-header { font-size: 16px; font-weight: 700; color: #f8fafc; margin-bottom: 6px; }
.brp-body { font-size: 13px; color: rgba(248,250,252,0.65); margin-bottom: 14px; line-height: 1.5; }
.brp-actions { display: flex; gap: 8px; }
.brp-btn { flex: 1; padding: 10px; border-radius: 10px; border: none; font-size: 13px; font-weight: 600; cursor: pointer; }
.brp-primary { background: #f43f5e; color: white; }
.brp-secondary { background: rgba(248,250,252,0.1); color: rgba(248,250,252,0.7); }
@keyframes brpSlideUp { from { transform: translateX(-50%) translateY(20px); opacity: 0; } to { transform: translateX(-50%) translateY(0); opacity: 1; } }
#vnm-callout .vnm-save-pin.pin-saved { color: #e11d48; border-color: #e11d48; background: rgba(225,29,72,0.06); }
