/* Vegas Map v2 — Monterey design system */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Monterey design tokens — warm earth palette */
  --col-art:    #C4784A;   /* copper/terracotta — primary accent */
  --col-auto:   #4A8EC4;   /* steel blue — transit */
  --col-hotel:  #9B6DC4;   /* amethyst — hotel buildings */
  --col-nature: #4AC487;   /* emerald — poker/nature */
  --col-food:   #C4A84A;   /* champagne gold — events/WSOP */
  --col-event:  #A0B4C8;   /* ice steel — TM events */
  --col-hist:   #9E8C7A;   /* warm stone — historic */
  --col-race:   #E05252;   /* racing red */

  /* Backgrounds — warm stone blacks */
  --bg:         #0A0906;
  --surface:    #111009;
  --bg-2:       #181510;
  --bg-3:       #221E18;

  /* Aliases for component use */
  --accent:     var(--col-art);
  --gold:       var(--col-food);
  --green:      var(--col-nature);

  /* Text — warm whites */
  --text:       #F0EAE0;
  --text-muted: #9E9080;
  --text-dim:   #5A5248;

  --border:     rgba(255,255,255,0.06);
  --safe-b:     env(safe-area-inset-bottom, 0px);
  --rail-h:     80px;
  --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 */
#vnm-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: 44px; background: rgba(10,9,6,0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 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: 44px 0 0; }
#map { position: absolute; inset: 0; }

/* Trip chips bar */
#trip-chips-bar {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 0 8px; z-index: 100;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
#trip-chips-bar::-webkit-scrollbar { display: none; }
.trip-chip {
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--border);
  background: rgba(10,9,6,0.82); 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(10,9,6,0.92); 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; }
#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-dist  { font-size: 10px; color: var(--text-muted); }

/* Date bar chip */
#date-bar-chip {
  position: absolute; bottom: calc(var(--rail-h) + var(--safe-b)); right: 12px; z-index: 201;
}
#date-bar-chip button {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border);
  background: rgba(10,9,6,0.88); backdrop-filter: blur(8px);
  color: var(--text); font-size: 12px; cursor: pointer;
}

/* 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(255,255,255,.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; }
#sheet-trip-chips-mobile::-webkit-scrollbar { display: none; }
#sheet-body { padding: 0 12px 12px; overflow-y: auto; max-height: 50vh; }
.sheet-placeholder { color: var(--text-muted); font-size: 13px; text-align: center; padding: 24px 0; }

/* Poker detail drawer */
#poker-detail-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 350;
  background: rgba(12,10,7,0.97); border-radius: 16px 16px 0 0;
  border-top: 2px solid var(--green);
  transform: translateY(100%); transition: transform .3s ease;
}
#poker-detail-bar.is-open { transform: translateY(calc(100% - 72px)); }
#poker-detail-bar.is-expanded { transform: translateY(0); }
.poker-drawer-handle { padding: 4px 0; cursor: grab; }

/* Hotel detail drawer */
#hotel-detail-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 350;
  background: rgba(10,9,6,0.97); border-radius: 16px 16px 0 0;
  border-top: 2px solid var(--accent);
  transform: translateY(100%); transition: transform .3s ease;
}
#hotel-detail-bar.is-open { transform: translateY(calc(100% - 80px)); }
#hotel-detail-bar.is-expanded { transform: translateY(0); }
.hotel-drawer-handle { padding: 4px 0; cursor: grab; }

/* 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 */
#layer-panel-btn {
  position: absolute; bottom: calc(90px + var(--safe-b)); left: 12px; z-index: 200;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border);
  background: rgba(10,9,6,0.88); backdrop-filter: blur(8px);
  color: var(--text); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#layer-panel {
  position: absolute; bottom: calc(140px + var(--safe-b)); left: 12px; z-index: 200;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 8px; min-width: 180px; display: none;
}
#layer-panel.is-open { display: block; }
.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(255,255,255,.15); }
.layer-group-header { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 8px 8px 4px; }

/* Desktop: hide mobile elements */
@media (min-width: 1024px) {
  #mobile-sheet { display: none; }
  #trip-chips-bar { left: 12px; transform: none; }
}
