/* Venue map + offline indicator.
   Tokens come from css/app.css. Every colour below is either a token or is
   redefined for dark mode, so the floor plan reads correctly in both themes. */

:root {
  --vm-ballroom: #002060;
  --vm-meeting: #467bb8;
  --vm-dining: #ff8044;
  --vm-foyer: #8aa7c9;
  --vm-service: #2b5672;
  --vm-facility: #94a0b8;
  --vm-transport: #e03939;

  --vm-floor: #eef2f9;
  --vm-room: #ffffff;
  --vm-room-line: #c7cfdf;
  --vm-room-ink: #1a1f2e;
  --vm-room-ink-2: #5a6379;
}

@media (prefers-color-scheme: dark) {
  :root {
    --vm-ballroom: #5f8ed0;
    --vm-meeting: #6ea3de;
    --vm-dining: #f09055;
    --vm-foyer: #6d87a8;
    --vm-service: #6e93b4;
    --vm-facility: #7c8699;

    --vm-floor: #121a2b;
    --vm-room: #1b2437;
    --vm-room-line: #35425f;
    --vm-room-ink: #eef2fa;
    --vm-room-ink-2: #a8b2c7;
  }
}

/* --------------------------------------------------------------- the hero */

.vm-hero { padding: var(--s-5); }
.vm-hero-kicker {
  margin: 0 0 var(--s-1);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}
.vm-hero-name { margin: 0 0 var(--s-1); font-size: 1.22rem; font-weight: 800; line-height: 1.2; color: #fff; }
.vm-hero-level { margin: 0; font-weight: 600; color: #fff; }
.vm-hero-address { margin: 2px 0 0; font-size: .88rem; color: rgba(255, 255, 255, .78); }

.vm-hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.vm-hero-btn {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .38);
  color: #fff;
}
.vm-hero-btn:hover { background: rgba(255, 255, 255, .24); }

/* ----------------------------------------------------- offline indicator */

.offline-chip {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  margin: var(--s-4) 0;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.offline-dot {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--muted);
}
.offline-chip.is-saved .offline-dot { background: var(--success); }
.offline-chip.is-offline .offline-dot { background: var(--warn); }
.offline-chip.is-unsupported .offline-dot { background: var(--line-strong); }
.offline-chip.is-busy .offline-dot { animation: vm-pulse 1s ease-in-out infinite; }

@keyframes vm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .offline-chip.is-busy .offline-dot { animation: none; }
}

.offline-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.offline-title { font-weight: 700; font-size: .92rem; color: var(--ink); }
.offline-sub { font-size: .8rem; line-height: 1.4; color: var(--muted); }
.offline-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); flex: none; }

@media (max-width: 480px) {
  .offline-chip { flex-wrap: wrap; }
  .offline-actions { width: 100%; padding-left: 22px; }
}

/* ------------------------------------------------------------- controls */

.vm-controls { display: flex; flex-direction: column; gap: var(--s-3); margin-bottom: var(--s-4); }

.vm-search-wrap { position: relative; display: block; }
.vm-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.05rem;
  color: var(--muted);
  pointer-events: none;
}
.vm-search { width: 100%; padding-left: 34px; }
.vm-search::-webkit-search-cancel-button { cursor: pointer; }

.vm-chips { margin: 0; }

/* ------------------------------------------------------------- map card */

.vm-map-card { padding: var(--s-4); }

.vm-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.vm-zoom { display: flex; gap: 4px; flex: none; }
.vm-zoom .icon-btn {
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  font-size: .82rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
}
.vm-zoom .icon-btn:hover { background: var(--surface-3); }

.vm-map-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--r-sm);
  background: var(--vm-floor);
}
.vm-map-inner { min-width: var(--vm-min, 620px); padding: var(--s-2); }

.vm-svg { display: block; width: 100%; height: auto; }

.vm-outline {
  fill: none;
  stroke: var(--vm-room-line);
  stroke-width: 3;
  stroke-dasharray: 10 8;
}

.vm-group-label {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .18em;
  fill: var(--vm-room-ink-2);
  opacity: .75;
}

.vm-divider {
  stroke: var(--vm-room-line);
  stroke-width: 3;
  stroke-dasharray: 6 7;
}

/* ------------------------------------------------------------- the rooms */

.vm-room { cursor: pointer; }
.vm-room:focus { outline: none; }
.vm-room:focus-visible .vm-room-shape { stroke: var(--focus); stroke-width: 5; }

.vm-room-shape {
  fill: var(--vm-room);
  stroke: var(--vm-room-line);
  stroke-width: 2.5;
  transition: fill .15s ease, stroke .15s ease;
}
.vm-room:hover .vm-room-shape { stroke: var(--vm-meeting); }

.vm-room-name { font-size: 19px; font-weight: 700; fill: var(--vm-room-ink); }
.vm-room-sub { font-size: 14px; font-weight: 600; fill: var(--vm-room-ink-2); }

/* Kind colouring: a tinted top edge plus the swatch colour on the list. */
.vm-room.vm-kind-ballroom .vm-room-shape { stroke: var(--vm-ballroom); }
.vm-room.vm-kind-meeting .vm-room-shape { stroke: var(--vm-meeting); }
.vm-room.vm-kind-dining .vm-room-shape { stroke: var(--vm-dining); }
.vm-room.vm-kind-foyer .vm-room-shape { stroke: var(--vm-foyer); }
.vm-room.vm-kind-service .vm-room-shape { stroke: var(--vm-service); }
.vm-room.vm-kind-facility .vm-room-shape { stroke: var(--vm-facility); }
.vm-room.vm-kind-transport .vm-room-shape { stroke: var(--vm-transport); }

.vm-room.vm-kind-foyer .vm-room-shape { fill: var(--vm-floor); }

.vm-room.is-active .vm-room-shape { stroke-width: 5; fill: var(--blue-soft); }
.vm-room.is-dim { opacity: .26; }
.vm-room.is-flash .vm-room-shape { animation: vm-flash 1.6s ease-out 1; }

@keyframes vm-flash {
  0%, 100% { stroke-width: 2.5; }
  20%, 60% { stroke-width: 7; }
}
@media (prefers-reduced-motion: reduce) {
  .vm-room.is-flash .vm-room-shape { animation: none; stroke-width: 6; }
}

.vm-pin { fill: var(--vm-ballroom); }
.vm-pin-text { font-size: 15px; font-weight: 800; fill: #fff; }
@media (prefers-color-scheme: dark) {
  .vm-pin-text { fill: #08101f; }
}

/* ---------------------------------------------------------------- legend */

.vm-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  margin-top: var(--s-3);
  font-size: .76rem;
  color: var(--muted);
}
.vm-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.vm-legend-swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--vm-meeting); }

.vm-map-note { margin: var(--s-3) 0 0; font-size: .76rem; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------- room list */

.vm-list { display: flex; flex-direction: column; gap: var(--s-2); }

.vm-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-3) var(--s-4);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
  cursor: pointer;
}
.vm-card:hover { border-color: var(--line-strong); }
.vm-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--blue-soft); }

.vm-card-swatch { flex: none; width: 10px; align-self: stretch; min-height: 38px; border-radius: var(--r-pill); background: var(--vm-meeting); }
.vm-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.vm-card-name { font-weight: 700; font-size: .96rem; }
.vm-card-meta { font-size: .78rem; color: var(--muted); }
.vm-card-next {
  font-size: .78rem;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vm-card-count {
  flex: none;
  align-self: center;
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-pill);
  background: var(--blue-soft);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
}
@media (prefers-color-scheme: dark) {
  .vm-card-count { color: var(--ink); }
}

.vm-empty-note { margin: 0; padding: var(--s-4); color: var(--muted); }

/* Swatch colours mirror the map. */
.vm-card-swatch.vm-kind-ballroom, .vm-legend-swatch.vm-kind-ballroom { background: var(--vm-ballroom); }
.vm-card-swatch.vm-kind-meeting, .vm-legend-swatch.vm-kind-meeting { background: var(--vm-meeting); }
.vm-card-swatch.vm-kind-dining, .vm-legend-swatch.vm-kind-dining { background: var(--vm-dining); }
.vm-card-swatch.vm-kind-foyer, .vm-legend-swatch.vm-kind-foyer { background: var(--vm-foyer); }
.vm-card-swatch.vm-kind-service, .vm-legend-swatch.vm-kind-service { background: var(--vm-service); }
.vm-card-swatch.vm-kind-facility, .vm-legend-swatch.vm-kind-facility { background: var(--vm-facility); }
.vm-card-swatch.vm-kind-transport, .vm-legend-swatch.vm-kind-transport { background: var(--vm-transport); }

.vm-foot { margin: var(--s-5) 0 0; font-size: .78rem; line-height: 1.5; color: var(--muted); }

/* ------------------------------------------------------------ room sheet */

.vm-sheet-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-3); }

.vm-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: .74rem;
  font-weight: 700;
  color: #fff;
  background: var(--vm-meeting);
}
.vm-tag-ballroom { background: var(--vm-ballroom); }
.vm-tag-meeting { background: var(--vm-meeting); }
.vm-tag-dining { background: var(--vm-dining); }
.vm-tag-foyer { background: var(--vm-foyer); }
.vm-tag-service { background: var(--vm-service); }
.vm-tag-facility { background: var(--vm-facility); }
.vm-tag-transport { background: var(--vm-transport); }
.vm-tag-plain { background: var(--surface-3); color: var(--ink-2); }
@media (prefers-color-scheme: dark) {
  .vm-tag { color: #08101f; }
  .vm-tag-plain { color: var(--ink-2); }
}

.vm-sheet-level { margin: 0 0 var(--s-2); font-size: .82rem; font-weight: 600; color: var(--muted); }
.vm-sheet-blurb { margin: 0 0 var(--s-4); line-height: 1.55; }

.vm-callout {
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.vm-callout-title { margin: 0 0 4px; font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.vm-callout-body { margin: 0; line-height: 1.5; }

.vm-sheet-block { margin-bottom: var(--s-4); }
.vm-sheet-h { margin: 0 0 var(--s-2); font-size: .88rem; font-weight: 800; }

.vm-features { margin: 0; padding-left: 1.1em; }
.vm-features li { margin-bottom: 4px; font-size: .88rem; color: var(--ink-2); }

.vm-session-list { display: flex; flex-direction: column; gap: var(--s-2); }
.vm-session {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: var(--s-3);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.vm-session:hover { border-color: var(--accent); }
.vm-session-when { font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.vm-session-title { font-weight: 600; line-height: 1.35; }
.vm-session-tag { font-size: .74rem; color: var(--muted); }

.vm-sheet-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ------------------------------------------------------------- room chip */

.vm-room-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.vm-room-chip:hover { border-color: var(--accent); color: var(--accent); }
.vm-room-chip.is-compact { padding: 1px 8px; font-size: .72rem; }
.vm-room-chip-pin { color: var(--accent); font-size: .7em; }
.vm-room-chip-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --------------------------------------------------------------- desktop */

@media (min-width: 720px) {
  .vm-controls { flex-direction: row; align-items: center; }
  .vm-search-wrap { flex: 0 0 260px; }
  .vm-chips { flex: 1 1 auto; }
}
