/* SPDX-License-Identifier: MIT · © 2026 Marcus Maldonado · https://marcus.band */
/* ============================================================
   TOUR MAP PAGE — dashboard layout
   header bar (brand + stats) on top, full-width map below,
   Now Playing card floats over the map (or stacks below on mobile)
   ============================================================ */
.tm-page { background: var(--bg); color: var(--fg); }

.tm-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* HEADER (top bar) */
.tm-left {
  padding: 26px 48px 22px;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 56px;
  border-bottom: 1px solid var(--hairline);
  flex-shrink: 0;
  min-width: 0;
}
.tm-brand {
  flex: 1;
  min-width: 0;
}
.tm-eyebrow {
  display: flex;
  gap: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 12px;
}
.tm-title {
  font-family: var(--display);
  font-size: 72px;
  line-height: 0.86;
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 400;
  text-transform: uppercase;
}
.tm-title em {
  font-style: normal;
  color: var(--accent);
  -webkit-text-stroke: 1.5px var(--fg);
  -webkit-text-fill-color: transparent;
}
.tm-lede {
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 560px;
  margin: 12px 0 0;
  text-wrap: pretty;
}

.tm-stats {
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
  border: none;
  flex-shrink: 0;
}
.tm-stat { text-align: right; }
.tm-stat-num {
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.01em;
}
.tm-stat-lbl {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
}

/* CANVAS — full-width map area */
.tm-right {
  flex: 1;
  position: relative;
  padding: 0;
  background: var(--bg-2);
  min-width: 0;
  min-height: 0;
}
.tm-map-frame {
  position: absolute;
  inset: 0;
  background: var(--bg);
  border: none;
  overflow: hidden;
}
.tm-tick { display: none; } /* legacy ticks unused in dashboard layout */

/* Now Playing — floating overlay on map */
.tm-now {
  position: absolute;
  bottom: 24px;
  left: 24px;
  width: 340px;
  padding: 18px 22px 16px;
  background: var(--bg);
  border: 1px solid var(--hairline);
  z-index: 800;
  margin: 0;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
}
.tm-now-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tm-pulse {
  display: inline-block;
  width: 7px; height: 7px;
  background: #C8A96E;
  border-radius: 50%;
  animation: tm-pulse 1.6s infinite;
}
@keyframes tm-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.7); }
}
.tm-now-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
}
.tm-now-date {
  border-right: 1px solid var(--hairline);
  padding-right: 18px;
}
.tm-now-day {
  font-family: var(--display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -0.02em;
}
.tm-now-mo {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-top: 4px;
}
.tm-now-artist {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.tm-now-venue {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tm-now-city {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.tm-now-bar {
  margin-top: 14px;
  height: 2px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
}
.tm-now-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--fg);
  transition: width 0.05s linear;
}
.tm-now-counter {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--muted);
  display: flex;
  gap: 4px;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

/* Legacy SVG-era styles retained for safety (not used by Leaflet path) */
.tm-map-meta {
  position: absolute;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  line-height: 1.5;
  z-index: 2;
}
.tm-map-meta--tl { top: 14px; left: 16px; }
.tm-map-meta--tr { top: 14px; right: 16px; text-align: right; }
.tm-map-meta--bl { bottom: 14px; left: 16px; }
.tm-map-meta--br { bottom: 14px; right: 16px; text-align: right; }

.tm-map { width: 100%; height: 100%; display: block; }
.tm-grat line { stroke: var(--hairline); stroke-width: 0.15; vector-effect: non-scaling-stroke; }
.tm-land path { fill: var(--fg); fill-opacity: 0.07; stroke: var(--fg); stroke-opacity: 0.35; stroke-width: 0.4; vector-effect: non-scaling-stroke; }
.tm-route { stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px var(--accent)); }
.tm-route-ghost { stroke: var(--fg); stroke-opacity: 0.18; stroke-width: 0.6; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.tm-dots .tm-dot-core { fill: var(--fg); fill-opacity: 0.35; transition: fill-opacity 0.25s, r 0.25s; }
.tm-dots .tm-dot.is-reached .tm-dot-core { fill: var(--accent); fill-opacity: 1; }
.tm-dots .tm-dot.is-active .tm-dot-core { fill: var(--accent); fill-opacity: 1; }
.tm-dot-pulse { fill: var(--accent); fill-opacity: 0.25; animation: tm-dot-pulse 1.4s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes tm-dot-pulse { 0% { transform: scale(0.6); fill-opacity: 0.45; } 100% { transform: scale(2.4); fill-opacity: 0; } }

.tm-legend {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 24px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  background: var(--bg);
  padding: 8px 14px;
  border: 1px solid var(--hairline);
}
.tm-legend-row { display: flex; align-items: center; gap: 8px; }
.tm-leg-swatch { width: 8px; height: 8px; display: inline-block; background: var(--fg); }
.tm-leg-swatch--public { background: var(--accent); border-radius: 50%; }
.tm-leg-swatch--private { background: transparent; border: 1px solid var(--fg); border-radius: 50%; }
.tm-leg-swatch--route { width: 18px; height: 1.5px; background: var(--accent); }

/* Mobile — stacked layout, Now Playing as full-width card below the map */
@media (max-width: 768px) {
  .tm-left {
    flex-direction: column;
    align-items: stretch;
    padding: 22px 24px;
    gap: 18px;
  }
  .tm-brand { width: 100%; }
  .tm-eyebrow { margin-bottom: 12px; }
  .tm-title { font-size: 48px; line-height: 0.92; }
  .tm-lede { display: none; }
  .tm-stats {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--hairline);
  }
  .tm-stat { text-align: left; }
  .tm-stat-num { font-size: 26px; }

  .tm-now {
    position: static;
    width: auto;
    box-shadow: none;
    border: none;
    border-top: 1px solid var(--hairline);
    padding: 22px 24px;
  }
  .tm-now-day { font-size: 32px; }
  .tm-now-venue { font-size: 14px; }
}

/* Pulsing ring on the active map marker */
.tm-pulse-marker { pointer-events: none; }
.tm-pulse-ring {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: transparent;
  animation: tm-pulse-ring 1.6s ease-out infinite;
  transform-origin: center;
  will-change: transform, opacity;
}
@keyframes tm-pulse-ring {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}
