/* ===== Live map tour of the real GVL Fit Fest venue (Fluor Field) =====
   Shared by /host/ and /highlights/gvl-fit-fest-2026/ together with
   venue-tour.js. Every class is prefixed vt- so it never fights styles.css
   or the page's own styles. Needs the colour variables from styles.css
   (--violet, --violet-2, --border, --text, --text-dim, --bg-elev). */
/* --text-muted (#6b7280) is under 4.5:1 on these dark cards; small helper
   text in the tour uses a lighter muted tone (about 5.6:1 on --bg-card). */
.vt-frame, .vt-hint { --vt-muted: #8b93a7; }
.vt-frame [hidden] { display: none !important; }
.vt-frame button:focus-visible { outline: 2px solid #b3a8ff; outline-offset: 2px; }

.vt-frame {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border-radius: 24px; border: 1px solid rgba(109, 92, 255, 0.3); background: #07080f;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 90px rgba(109, 92, 255, 0.16);
}
.vt-map { position: relative; height: clamp(340px, 56vh, 520px); background: #07080f; }
/* Two classes: mapbox-gl.css loads later and sets .mapboxgl-map { position: relative }. */
.vt-map > .vt-map__canvas { position: absolute; inset: 0; }
.vt-map::after { /* cinematic vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 90px rgba(5, 6, 10, 0.75);
}
.vt-map__loading {
  position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center;
  gap: 18px; color: var(--vt-muted); font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  background: radial-gradient(circle at 50% 45%, #141a33 0%, #07080f 65%);
  transition: opacity 0.6s;
}
.vt-frame.is-ready .vt-map__loading, .vt-frame.is-fallback .vt-map__loading { opacity: 0; pointer-events: none; }
.vt-radar { position: relative; width: 84px; height: 84px; }
.vt-radar i {
  position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(124, 92, 255, 0.7);
  animation: vt-ping 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.vt-radar i:nth-child(2) { animation-delay: 0.8s; }
.vt-radar i:nth-child(3) { animation-delay: 1.6s; }
.vt-radar::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--violet-2); box-shadow: 0 0 22px 6px rgba(109, 92, 255, 0.7);
}
@keyframes vt-ping { from { transform: scale(0.15); opacity: 1; } to { transform: scale(1); opacity: 0; } }

.vt-badge {
  position: absolute; z-index: 3; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 13px; border-radius: 999px; background: rgba(5, 6, 10, 0.74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text); letter-spacing: 0.02em;
}
.vt-badge__state { text-transform: uppercase; letter-spacing: 0.14em; }
.vt-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; }
.vt-frame[data-mode="tour"] .vt-badge__dot { background: #ff4d6d; animation: vt-live 1.6s ease-out infinite; }
.vt-frame[data-mode="explore"] .vt-badge__dot { background: #7c5cff; box-shadow: 0 0 10px #7c5cff; }
@keyframes vt-live {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.65); }
  100% { box-shadow: 0 0 0 10px rgba(255, 77, 109, 0); }
}
.vt-badge__place { color: var(--text-dim); font-weight: 600; }
.vt-badge__place::before { content: ""; display: inline-block; width: 1px; height: 11px; background: var(--border); margin-right: 9px; vertical-align: -1px; }
.vt-legend {
  position: absolute; z-index: 3; top: 16px; right: 16px; display: flex; align-items: center; gap: 12px;
  padding: 7px 14px; border-radius: 999px; background: rgba(5, 6, 10, 0.74);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-dim);
}
.vt-legend:empty { display: none; }
.vt-legend span { display: inline-flex; align-items: center; gap: 6px; }
.vt-legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.vt-legend b { color: var(--text); font-weight: 700; }
.vt-status {
  position: absolute; z-index: 3; top: 58px; left: 16px; max-width: calc(100% - 32px);
  padding: 8px 13px; border-radius: 12px; background: rgba(109, 92, 255, 0.92); color: #fff;
  font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(109, 92, 255, 0.35);
  opacity: 0; transform: translateY(-6px); transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.vt-status.is-on { opacity: 1; transform: none; }

.vt-card { position: relative; z-index: 3; background: var(--bg-elev); border-top: 1px solid var(--border); padding: 14px 18px 18px; }
.vt-segs { display: flex; gap: 4px; margin: 0 0 10px; }
.vt-seg { flex: 1 1 0; min-width: 0; padding: 7px 0; border: 0; background: none; cursor: pointer; }
.vt-seg:disabled { cursor: default; }
.vt-seg__track { display: block; position: relative; height: 4px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, 0.13); transition: background 0.2s; }
.vt-seg:hover .vt-seg__track { background: rgba(255, 255, 255, 0.26); }
.vt-seg.is-active .vt-seg__track { background: rgba(255, 255, 255, 0.3); }
.vt-seg__fill {
  position: absolute; inset: 0; transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, #a99cff, #6d5cff 55%, #4f7cff); border-radius: inherit;
}
.vt-seg.is-done .vt-seg__fill { transform: scaleX(1); }
.vt-card__meta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #b9aeff; margin-bottom: 8px; }
.vt-card__count { color: var(--vt-muted); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
/* Every stop is rendered into the same grid cell: the cell is as tall as
   the longest caption, so the page never jumps while the tour plays. */
.vt-stops { display: grid; }
.vt-stop { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity 0.35s, visibility 0s 0.35s; }
.vt-stop.is-active { visibility: visible; opacity: 1; transition: opacity 0.45s; }
.vt-stop__kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: #b9aeff; margin-bottom: 6px; }
.vt-stop__title { font-size: 21px; line-height: 1.2; font-weight: 800; letter-spacing: -0.015em; margin: 0 0 8px; }
.vt-stop__text { color: var(--text-dim); font-size: 15px; line-height: 1.55; margin: 0 0 12px; }
.vt-stop__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.vt-stop__tags span {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #d7d1ff;
  background: rgba(109, 92, 255, 0.14); border: 1px solid rgba(109, 92, 255, 0.32);
}
.vt-stop.is-active .vt-stop__title, .vt-stop.is-active .vt-stop__text, .vt-stop.is-active .vt-stop__tags { animation: vt-rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.vt-stop.is-active .vt-stop__text { animation-delay: 0.06s; }
.vt-stop.is-active .vt-stop__tags { animation-delay: 0.12s; }
@keyframes vt-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.vt-controls { display: flex; align-items: center; gap: 8px; margin-top: 16px; }
.vt-ctl {
  width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.04); color: var(--text); cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.vt-ctl:hover:not(:disabled) { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.18); }
.vt-ctl:disabled, .vt-explore:disabled { opacity: 0.45; cursor: default; }
.vt-ctl svg { width: 18px; height: 18px; }
.vt-ctl--play { width: 46px; height: 46px; border-radius: 50%; background: var(--violet); border-color: transparent; box-shadow: 0 8px 22px rgba(109, 92, 255, 0.45); }
.vt-ctl--play:hover:not(:disabled) { background: var(--violet-2); transform: scale(1.04); }
.vt-ico-pause { display: none; }
.vt-frame[data-mode="tour"] .vt-ico-pause { display: block; }
.vt-frame[data-mode="tour"] .vt-ico-play { display: none; }
.vt-explore {
  margin-left: auto; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border-radius: 12px; border: 1px solid rgba(109, 92, 255, 0.55); background: transparent; color: var(--text);
  font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.vt-explore:hover:not(:disabled) { background: rgba(109, 92, 255, 0.14); border-color: var(--violet-2); }
.vt-explore svg { width: 17px; height: 17px; }
.vt-frame[data-mode="explore"] .vt-explore { background: rgba(109, 92, 255, 0.18); }
.vt-hint { text-align: center; color: var(--vt-muted); font-size: 13.5px; margin: 16px auto 0; max-width: 620px; }

/* Fallback (no WebGL / map blocked) */
.vt-fallback { position: relative; z-index: 2; padding: 28px 24px 30px; background: radial-gradient(circle at 50% 0%, #141a33 0%, #07080f 70%); }
.vt-fallback__head { display: flex; gap: 14px; align-items: flex-start; max-width: 720px; margin: 0 auto 22px; }
.vt-fallback__icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(109, 92, 255, 0.16); color: #b9aeff; }
.vt-fallback__icon svg { width: 22px; height: 22px; }
.vt-fallback h3 { margin: 0 0 4px; font-size: 18px; }
.vt-fallback__head p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.vt-fallback__list { list-style: none; margin: 0 auto; padding: 0; max-width: 720px; display: grid; gap: 10px; }
.vt-fallback__list li { display: flex; gap: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(17, 22, 39, 0.75); border: 1px solid var(--border); }
.vt-fallback__num { flex: 0 0 auto; font-weight: 800; color: #b9aeff; font-variant-numeric: tabular-nums; }
.vt-fallback__list strong { display: block; margin-bottom: 2px; }
.vt-fallback__list p { margin: 0; color: var(--text-dim); font-size: 14px; }
.vt-frame.is-fallback .vt-map { height: auto; }
.vt-frame.is-fallback .vt-map > .vt-map__canvas, .vt-frame.is-fallback .vt-badge, .vt-frame.is-fallback .vt-legend,
.vt-frame.is-fallback .vt-status, .vt-frame.is-fallback .vt-card, .vt-frame.is-fallback .vt-map::after { display: none; }
.vt-frame.is-fallback + .vt-hint { display: none; }
.vt-noscript { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--text-dim); background: #07080f; }

/* Map chrome (Mapbox controls, popup, focus ripple) */
.vt-frame .mapboxgl-ctrl-group { background: rgba(11, 15, 26, 0.92); border: 1px solid var(--border); box-shadow: none; }
.vt-frame .mapboxgl-ctrl-group button + button { border-top: 1px solid var(--border); }
.vt-frame .mapboxgl-ctrl-group button .mapboxgl-ctrl-icon { filter: invert(1) brightness(1.4); }
.vt-frame:not([data-mode="explore"]) .mapboxgl-ctrl-group { display: none; }
.vt-frame .mapboxgl-ctrl-attrib.mapboxgl-compact { background: rgba(255, 255, 255, 0.75); }
.vt-frame .mapboxgl-popup-content {
  background: rgba(11, 15, 26, 0.96); color: var(--text); border: 1px solid rgba(109, 92, 255, 0.4);
  border-radius: 12px; padding: 10px 14px; font-family: 'Inter', system-ui, sans-serif; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}
.vt-frame .mapboxgl-popup-tip { display: none; }
.vt-pop strong { display: block; font-size: 14px; line-height: 1.3; }
.vt-pop span { display: inline-flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--text-dim); }
.vt-pop span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #7c5cff); }
.vt-ripple { width: 22px; height: 22px; pointer-events: none; }
.vt-ripple::before, .vt-ripple::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #c4bbff;
  animation: vt-ripple 2.2s ease-out infinite;
}
.vt-ripple::after { animation-delay: 1.1s; }
@keyframes vt-ripple { from { transform: scale(0.7); opacity: 0.95; } to { transform: scale(3.4); opacity: 0; } }

@media (min-width: 900px) {
  .vt-map { height: min(78vh, 720px); min-height: 560px; }
  .vt-card {
    position: absolute; left: 22px; bottom: 22px; width: 380px; border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 18px; padding: 14px 20px 18px; background: rgba(8, 10, 20, 0.8);
    -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.5);
  }
}
/* The badge (top-left) and the legend (top-right) need about 760px side
   by side; below that the legend would slide under the badge. */
@media (max-width: 820px) {
  .vt-legend { display: none; }
}
@media (max-width: 520px) {
  .vt-badge__place { display: none; }
  .vt-frame { border-radius: 18px; }
  .vt-stop__title { font-size: 19px; }
  .vt-explore { padding: 0 12px; }
}
/* Small phones: tighten the control row so "Explore map" / "Back to
   tour" stays on one line inside its button. */
@media (max-width: 400px) {
  .vt-card { padding: 12px 14px 16px; }
  .vt-controls { gap: 6px; }
  .vt-ctl { width: 36px; height: 36px; border-radius: 11px; }
  .vt-ctl--play { width: 42px; height: 42px; border-radius: 50%; }
  .vt-explore { height: 36px; padding: 0 10px; gap: 6px; font-size: 13.5px; }
  .vt-explore svg { width: 16px; height: 16px; }
}
/* Under about 340px there is no room for the icon as well. */
@media (max-width: 340px) {
  .vt-explore svg { display: none; }
}
/* Reduced motion: no auto-play (venue-tour.js shows a still overview with
   manual next / previous), so the play button goes too. */
@media (prefers-reduced-motion: reduce) {
  .vt-radar i, .vt-frame[data-mode="tour"] .vt-badge__dot { animation: none !important; }
  .vt-stop, .vt-stop.is-active { transition: none; }
  .vt-stop.is-active .vt-stop__title, .vt-stop.is-active .vt-stop__text, .vt-stop.is-active .vt-stop__tags { animation: none; }
  .vt-ripple::before { animation: none; transform: scale(1.7); opacity: 0.85; }
  .vt-ripple::after { display: none; }
  .vt-frame .vt-ctl--play { display: none; }
}
