/* ==========================================================================
   SkyBound Drone Operations — Tactical 3D Digital Twin Stylesheet
   London Waterloo Hub & SWML Live Transit Visualiser
   ========================================================================== */

:root {
  --bg-primary: #060911;
  --bg-panel: rgba(11, 17, 32, 0.88);
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  
  --border-color: rgba(56, 189, 248, 0.18);
  --border-glow: rgba(56, 189, 248, 0.4);
  
  --accent-cyan: #00f0ff;
  --accent-blue: #38bdf8;
  --accent-amber: #ffd600;
  --accent-orange: #ff9800;
  --accent-crimson: #ff0055;
  --accent-emerald: #00ff88;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 13px;
  user-select: none;
}

/* Viewport Containers */
#viewport-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#map-view, #dream-loop-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#dream-loop-view {
  display: none;
  background: #060911;
}

/* ==========================================================================
   Top Navigation HUD
   ========================================================================== */
#top-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, rgba(6, 9, 17, 0.96) 0%, rgba(6, 9, 17, 0.75) 85%, transparent 100%);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #060911;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.4);
}

.brand-title {
  display: flex;
  flex-direction: column;
}

.brand-title h1 {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title .hub-tag {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Quick Status Badges */
.hud-status-badges {
  display: flex;
  gap: 8px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse-glow 2s infinite ease-in-out;
}

.pulse-dot.amber {
  background: var(--accent-amber);
  box-shadow: 0 0 8px var(--accent-amber);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Engine Mode Switcher */
.engine-switcher {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.mode-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.mode-btn.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25) 0%, rgba(2, 132, 199, 0.35) 100%);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.25);
}

/* Quick Nav Buttons */
.quick-nav {
  display: flex;
  gap: 6px;
}

.nav-action-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.nav-action-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-blue);
  color: #ffffff;
}

/* ==========================================================================
   Left Sidebar Control Panel
   ========================================================================== */
#sidebar {
  position: absolute;
  top: 75px;
  left: 20px;
  bottom: 65px;
  width: 360px;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(56, 189, 248, 0.03);
  z-index: 40;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#sidebar.collapsed {
  transform: translateX(-380px);
}

/* Sidebar Tab Navigation */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.6);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 12px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.05);
}

.tab-badge {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--accent-blue);
}

/* Sidebar Scrollable Body */
.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
}

.sidebar-content::-webkit-scrollbar {
  width: 5px;
}
.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 3px;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* Section Header */
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-blue);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Layer Toggle Cards */
.layer-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s;
}

.layer-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: var(--bg-card-hover);
}

.layer-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.layer-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  box-shadow: 0 0 6px currentColor;
}

.layer-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 12px;
}

.layer-desc {
  font-size: 10px;
  color: var(--text-dim);
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 18px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: .3s;
  border-radius: 18px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-cyan);
}

input:checked + .slider:before {
  transform: translateX(16px);
  background-color: #060911;
}

/* Sliders Control */
.control-group {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.range-input {
  width: 100%;
  accent-color: var(--accent-cyan);
  cursor: pointer;
}

/* Zone List Item */
.zone-item {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.zone-item:hover {
  border-color: var(--accent-blue);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.zone-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.zone-title {
  font-weight: 700;
  font-size: 12px;
  color: #ffffff;
}

.zone-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.zone-details {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

/* Drone Fleet Cards */
.drone-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.drone-card:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.15);
}

.drone-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent-cyan);
}

.drone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.drone-name {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.drone-mission {
  font-size: 11px;
  color: var(--accent-amber);
  margin-bottom: 8px;
  font-weight: 600;
}

.drone-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.telemetry-box {
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: 6px;
  text-align: center;
}

.telemetry-box .label {
  font-size: 9px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.telemetry-box .val {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
}

.chase-btn {
  width: 100%;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.15) 0%, rgba(2, 132, 199, 0.25) 100%);
  border: 1px solid var(--accent-cyan);
  color: var(--accent-cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.chase-btn:hover {
  background: var(--accent-cyan);
  color: #060911;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Live Train Cards */
.train-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s;
}

.train-card:hover {
  border-color: var(--accent-amber);
  box-shadow: 0 4px 20px rgba(255, 214, 0, 0.15);
}

.train-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.train-title {
  font-size: 13px;
  font-weight: 800;
  color: #ffffff;
}

.train-route {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ==========================================================================
   Bottom Controls Bar
   ========================================================================== */
#bottom-hud {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(0deg, rgba(6, 9, 17, 0.96) 0%, rgba(6, 9, 17, 0.75) 85%, transparent 100%);
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-btn {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.sim-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.sim-btn.active {
  background: var(--accent-cyan);
  color: #060911;
  border-color: var(--accent-cyan);
}

.active-chase-badge {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(255, 42, 95, 0.15);
  border: 1px solid var(--accent-crimson);
  color: #ff6b8b;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.exit-chase-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
}

/* ==========================================================================
   Map Markers (3D HTML Markers)
   ========================================================================== */
.waterloo-hub-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.hub-pulse {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: hub-wave 2s infinite ease-out;
}

@keyframes hub-wave {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hub-icon {
  position: relative;
  background: #00f0ff;
  color: #060911;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px #00f0ff;
}

.hub-label {
  position: absolute;
  top: -18px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  background: rgba(6, 9, 17, 0.85);
  color: var(--accent-cyan);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent-cyan);
}

/* ==========================================================================
   Map Markers (3D HTML Markers)
   ========================================================================== */
.waterloo-hub-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.hub-pulse {
  position: absolute;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  animation: hub-wave 2s infinite ease-out;
}

@keyframes hub-wave {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.hub-icon {
  position: relative;
  background: #00f0ff;
  color: #060911;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px #00f0ff;
}

.hub-label {
  position: absolute;
  top: -18px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  background: rgba(6, 9, 17, 0.85);
  color: var(--accent-cyan);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--accent-cyan);
}

/* ==========================================================================
   3D BOX TRAINS with South Western Railway Liveries
   ========================================================================== */
.train-3d-box-marker {
  cursor: pointer;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.7));
}

.train-box-car {
  position: relative;
  width: 22px;
  height: 48px;
  border-radius: 5px;
  border: 1.5px solid #ffd000;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8), 0 0 12px rgba(0, 40, 85, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #002855;
}

/* Yellow Warning Front Nose (British Rail Standard) */
.train-nose-cab {
  height: 12px;
  background: #ffd000;
  border-bottom: 2px solid #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.train-headlights-beam {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 24px solid rgba(255, 255, 255, 0.65);
  pointer-events: none;
  filter: blur(1px);
}

.train-lamp {
  position: absolute;
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px #ffffff;
}
.train-lamp.l-left { left: 3px; }
.train-lamp.l-right { right: 3px; }

/* Carriage Body */
.train-body-carriage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.train-stripe {
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 3px;
  box-shadow: 0 0 4px currentColor;
}

.train-windows-lit {
  position: absolute;
  top: 9px;
  bottom: 6px;
  left: 2px;
  right: 2px;
  background: repeating-linear-gradient(
    180deg,
    #fef08a 0px,
    #fef08a 3px,
    transparent 3px,
    transparent 6px
  );
  box-shadow: 0 0 6px #fef08a;
  opacity: 0.85;
}

.train-code-badge {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  color: #ffffff;
  z-index: 2;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Rear Tail Cab */
.train-tail-cab {
  height: 6px;
  background: #1e293b;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.train-tail-lamp {
  width: 5px;
  height: 2px;
  background: #ff0033;
  box-shadow: 0 0 6px #ff0033;
  border-radius: 1px;
}

/* ==========================================================================
   AERIAL DRONES: Vertical Altitude Line & Ground Point
   ========================================================================== */
.drone-altitude-composite-marker {
  position: relative;
  cursor: pointer;
  transform: translate(-50%, -100%);
  pointer-events: auto;
}

/* 1. Ground Point Reticle (Directly on ground surface) */
.drone-ground-point {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.ground-reticle-pulse {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1.5px solid var(--accent-cyan);
  border-radius: 50%;
  animation: radar-sweep 2s infinite ease-out;
}

@keyframes radar-sweep {
  0% { transform: scale(0.3); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.ground-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.6);
  border-radius: 50%;
}

.ground-center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

/* 2. Vertical Altitude Drop Tether Line */
.drone-vertical-tether {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-left: 2px dashed var(--accent-cyan);
  opacity: 0.85;
  pointer-events: none;
}

.tether-laser-pulse {
  position: absolute;
  top: 0;
  left: -2px;
  width: 4px;
  height: 100%;
  animation: laser-fall 2s infinite linear;
}

@keyframes laser-fall {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.altitude-callout-pill {
  position: absolute;
  top: 50%;
  left: 8px;
  transform: translateY(-50%);
  background: rgba(6, 9, 17, 0.9);
  border: 1px solid var(--accent-cyan);
  border-radius: 4px;
  padding: 2px 6px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.alt-arrow {
  color: var(--accent-cyan);
  font-weight: 900;
}

/* 3. Airborne Drone Body at top of tether */
.airborne-drone-body {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.drone-core {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #080c14;
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px var(--accent-cyan);
}

.drone-strobe {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: pulse-glow 1s infinite ease-in-out;
}

.drone-callsign-tag {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 3px;
  margin-top: 3px;
  white-space: nowrap;
}

/* ==========================================================================
   Landmark Popups & Modals
   ========================================================================== */
.landmark-popup-card {
  color: #0f172a;
  font-family: var(--font-sans);
  padding: 4px;
}

/* Mapbox API Key Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  width: 460px;
  background: var(--bg-panel);
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 240, 255, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.modal-close-btn:hover {
  color: #ffffff;
}

.modal-body p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

.token-input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  margin-bottom: 14px;
  outline: none;
}

.token-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

.style-selector-group {
  margin-bottom: 18px;
}

.style-selector-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.style-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.style-option-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}

.style-option-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-blue);
  color: #ffffff;
}

.style-option-btn.active {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  font-weight: 700;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-btn-cancel {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.modal-btn-apply {
  background: linear-gradient(135deg, #00f0ff 0%, #0284c7 100%);
  border: none;
  color: #060911;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
}

.modal-btn-apply:hover {
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.5);
}

