/* ═══════════════════════════════════════════════════════════
   Atlas Live Tracker — Dark Mode CSS
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Color Palette */
  --bg-void:       #090b10;
  --bg-deep:       #0d1117;
  --bg-surface:    #111827;
  --bg-card:       #1a2234;
  --bg-elevated:   #1f2d3d;
  --bg-glass:      rgba(17, 24, 39, 0.85);

  --accent-primary:  #3b82f6;
  --accent-cyan:     #06b6d4;
  --accent-green:    #10b981;
  --accent-amber:    #f59e0b;
  --accent-red:      #ef4444;
  --accent-purple:   #8b5cf6;
  --accent-military: #84cc16;

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #475569;
  --text-dim:       #334155;

  --border-subtle: rgba(255,255,255,0.06);
  --border-glow:   rgba(59,130,246,0.3);

  --topbar-h: 54px;
  --panel-w:  425px;
  --radius:   12px;
  --radius-sm: 8px;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg-void);
  color: var(--text-primary);
}

/* ─── Top Bar ─── */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(9, 11, 16, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
}
.logo-icon {
  width: 26px; height: 26px;
  color: var(--accent-primary);
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.6));
}
.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #60a5fa, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats-pill {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px) saturate(180%);
  max-width: calc(100vw - 440px);
  overflow-x: auto;
  scrollbar-width: none;
  transition: all 0.25s ease;
}
.stats-pill::-webkit-scrollbar {
  display: none;
}

.stat-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border-radius: 99px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.stat-item.clickable {
  cursor: pointer;
}

.stat-item.clickable:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transform: translateY(-1px);
}

.stat-item.hidden {
  display: none !important;
}

/* Subtle separator between consecutive visible items */
.stat-item:not(.hidden) + .stat-item:not(.hidden)::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
  margin-right: 4px;
  vertical-align: middle;
}

.stat-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.stat-icon.icon-plane { color: #38bdf8; }
.stat-icon.icon-weather { color: #22d3ee; }
.stat-icon.icon-police { color: #60a5fa; }
.stat-icon.icon-fire { color: #f87171; }
.stat-icon.icon-airport { color: #fbbf24; }
.stat-icon.icon-boat { color: #c084fc; }
.stat-icon.icon-train { color: #facc15; }
.stat-icon.icon-aprs { color: #34d399; }

.stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.78rem;
  color: #f8fafc;
}

.stat-name {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stat-item:hover .stat-name {
  color: var(--text-secondary);
}

.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.dot-green {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}
.dot-cyan {
  background: #38bdf8;
  box-shadow: 0 0 6px rgba(56, 189, 248, 0.8);
}
.dot-blue {
  background: #3b82f6;
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.8);
}
.dot-red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}
.dot-amber {
  background: #f59e0b;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
}
.dot-purple {
  background: #a855f7;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.8);
}
.dot-yellow {
  background: #eab308;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.8);
}
.dot-emerald {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.update-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  padding-left: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.nav-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59,130,246,0.2);
}
.nav-btn.active {
  background: rgba(59,130,246,0.15);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 12px rgba(59,130,246,0.3);
}
.nav-btn svg { width: 16px; height: 16px; }

.refresh-indicator {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.refresh-icon {
  width: 18px; height: 18px;
  color: var(--text-muted);
  transition: color 0.3s;
}
.refresh-icon.spinning {
  animation: spin 1s linear infinite;
  color: var(--accent-cyan);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Map ─── */
#map {
  position: fixed;
  top: var(--topbar-h);
  left: 0; right: 0; bottom: 0;
  z-index: 1;
}

/* Remove Leaflet default attribution style conflicts */
.leaflet-container { background: var(--bg-void); }
.leaflet-control-attribution {
  background: rgba(9,11,16,0.8) !important;
  color: var(--text-muted) !important;
  font-size: 0.65rem;
}
.leaflet-control-attribution a { color: var(--accent-cyan) !important; }
.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-subtle) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--bg-elevated) !important;
}

/* ─── Filter Panel ─── */
.filter-panel {
  position: fixed;
  top: calc(var(--topbar-h) + 8px);
  right: 58px;
  z-index: 999;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: opacity 0.2s, transform 0.2s;
}
.filter-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
}
.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.filter-header button {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.2s;
}
.filter-header button:hover { color: var(--text-primary); }
.filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.filter-check:hover { color: var(--text-primary); }
.filter-check input[type="checkbox"] {
  appearance: none;
  width: 16px; height: 16px;
  border: 2px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--bg-deep);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  flex-shrink: 0;
}
.filter-check input[type="checkbox"]:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}
.filter-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 3px; top: 0px;
  width: 6px; height: 10px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

/* ─── Side Panel ─── */
.side-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  bottom: 0;
  width: var(--panel-w);
  z-index: 900;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(150%);
  border-left: 1px solid var(--border-subtle);
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--bg-elevated) transparent;
  padding-bottom: 32px;
}
.side-panel.closed {
  transform: translateX(100%);
}
.side-panel::-webkit-scrollbar { width: 4px; }
.side-panel::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 2px; }

.side-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 30px; height: 30px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}
.side-close:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* Aircraft Header */
.ac-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.ac-icon-large {
  width: 52px; height: 52px;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ac-icon-large svg {
  width: 32px; height: 32px;
}
.ac-titles { flex: 1; min-width: 0; }
.ac-callsign {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
}
.ac-registration {
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}
.ac-type {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}
.ac-flag {
  font-size: 1.8rem;
  line-height: 1;
  margin-top: 2px;
}

/* Photo */
.ac-photo-wrap {
  position: relative;
  background: var(--bg-deep);
  overflow: hidden;
}
.ac-photo-wrap img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}
.ac-photo-credit {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 0.68rem;
  color: rgba(255,255,255,0.6);
}
.ac-no-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 20px;
  color: var(--text-dim);
  background: var(--bg-deep);
}
.ac-no-photo svg { width: 48px; height: 48px; }
.ac-no-photo p { font-size: 0.82rem; }

/* Section Labels */
.section-label {
  padding: 14px 18px 6px;
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* Telemetry Grid */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 14px 4px;
}
.telem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
  transition: border-color 0.3s;
}
.telem-card:hover {
  border-color: var(--border-glow);
}
.telem-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.telem-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Detail List */
.detail-list {
  margin: 0 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
}
.detail-row:last-child { border-bottom: none; }
.detail-key {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.detail-val {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
  word-break: break-all;
}

/* Route Section */
.route-section {
  padding: 0 14px;
}
.route-section.hidden { display: none; }
.route-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 4px;
}
.route-airport {
  flex: 1;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}
.route-arrow { flex: 0; color: var(--text-muted); }
.route-arrow svg { width: 40px; height: 12px; }
.route-names {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-bottom: 8px;
}
.route-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: auto;
}
.route-badge.live {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.route-badge.scheduled {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.route-live-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--radius-sm);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}
.route-live-btn:hover {
  background: rgba(14, 165, 233, 0.22);
  border-color: #38bdf8;
  color: #fff;
}

/* External Links */
.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 14px 0;
}
.ext-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  text-decoration: none;
  transition: all 0.2s;
}
.ext-link:hover {
  background: rgba(6,182,212,0.12);
  border-color: var(--accent-cyan);
  color: var(--text-primary);
}

/* ─── Legend ─── */
#legend {
  position: fixed;
  bottom: 20px;
  left: 14px;
  z-index: 800;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.75rem;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
#legend.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.97);
}
.legend-title {
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  padding: 3px 0;
}
.legend-icon {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── Aircraft Map Icons (SVG divIcons) ─── */
.ac-marker { 
  cursor: pointer; 
}
.ac-marker svg {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.6));
  transition: filter 0.2s;
}
.ac-marker:hover svg {
  filter: drop-shadow(0 0 12px rgba(59,130,246,0.8));
}
.ac-marker.selected svg {
  filter: drop-shadow(0 0 14px rgba(59,130,246,0.9)) brightness(1.3);
}

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  padding: 10px 20px;
  font-size: 0.85rem;
  color: var(--text-primary);
  z-index: 2000;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}
.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
}
.toast.info  { border-color: var(--accent-cyan); }
.toast.error { border-color: var(--accent-red); }

/* ─── Leaflet tooltip/popup overrides ─── */
.leaflet-tooltip {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.72rem !important;
  border-radius: 6px !important;
  padding: 4px 8px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
  white-space: nowrap;
}
.leaflet-tooltip::before {
  display: none !important;
}

/* ─── Scrollbar for body ─── */
body::-webkit-scrollbar { width: 0; }

/* ─── Legend Colored Icons ─── */
.icon-plane::before  { content: '✈'; color: var(--accent-primary); font-size: 16px; }
.icon-heli::before   { content: '⬡'; color: var(--accent-cyan); font-size: 14px; }
.icon-mil::before    { content: '▲'; color: var(--accent-military); font-size: 14px; }
.icon-small::before  { content: '✈'; color: var(--accent-amber); font-size: 13px; }
.icon-ground::before { content: '●'; color: var(--text-dim); font-size: 12px; }
/* .icon-ufo uses inline SVG set directly in HTML */

/* ─── UFO hover float animation ─── */
@keyframes ufo-hover {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-3px); }
}
.ufo-spin svg {
  animation: ufo-hover 2.4s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(167,139,250,0.8));
}
.ufo-spin:hover svg, .ufo-spin.selected svg {
  filter: drop-shadow(0 0 14px rgba(167,139,250,1)) brightness(1.3);
}

/* ─── Squawk alert ─── */
.squawk-7700 { color: var(--accent-red) !important; animation: blink 0.8s step-end infinite; }
.squawk-7600 { color: var(--accent-amber) !important; }
.squawk-7500 { color: var(--accent-red) !important; animation: blink 0.5s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }


/* ─── Loading spinner overlay ─── */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-void);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity 0.5s;
}
#loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Airport Map Markers ─── */
.airport-marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #38bdf8;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4), inset 0 0 6px rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.airport-marker-pin:hover {
  transform: scale(1.2);
  background: rgba(14, 165, 233, 0.25);
  border-color: #7dd3fc;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
  color: #ffffff;
}
.airport-marker-pin.has-atc::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #10b981;
  border: 1.5px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

/* ─── Airport Details Panel ─── */
.airport-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 12px;
  color: #38bdf8;
  flex-shrink: 0;
}
.airport-codes-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.airport-code-icao {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f8fafc;
}
.airport-code-iata {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  font-weight: 600;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
}
.flight-cat-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 99px;
  text-transform: uppercase;
}
.cat-vfr {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.cat-mvfr {
  background: rgba(59, 130, 246, 0.18);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.cat-ifr {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.cat-lifr {
  background: rgba(168, 85, 247, 0.18);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}
.airport-name-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
.airport-location-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── METAR Weather Card ─── */
.metar-card {
  margin: 0 14px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.metar-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.metar-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 6px 10px;
}
.metar-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.metar-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}
.metar-clouds {
  font-size: 0.75rem;
  color: #cbd5e1;
  padding: 4px 6px;
  background: rgba(56, 189, 248, 0.06);
  border-radius: 4px;
  margin-bottom: 8px;
}
.raw-metar-box {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #94a3b8;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 6px 8px;
  word-break: break-all;
  user-select: all;
}

/* ─── Runways List ─── */
.runways-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}
.runway-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 8px;
}

/* ─── LiveATC Feeds List ─── */
.liveatc-badge {
  font-size: 0.62rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.liveatc-feeds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 14px 10px;
}
.feed-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.feed-card:hover {
  background: rgba(30, 41, 59, 0.7);
  border-color: rgba(56, 189, 248, 0.3);
}
.feed-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feed-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.feed-freq {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #38bdf8;
}
.feed-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-btn-play {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 6px;
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.feed-btn-play:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.feed-btn-play.is-streaming {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}
.feed-btn-html5 {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.7rem;
  text-decoration: none;
  transition: all 0.2s;
}
.feed-btn-html5:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* ─── Floating ATC Audio Players Stack (Bottom-Left, Up to 5 Streams) ─── */
#liveatc-players-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1200;
  display: flex;
  flex-direction: column-reverse; /* Stacks upward starting from the bottom-left corner */
  gap: 10px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: none;
  padding: 4px;
}
#liveatc-players-container::-webkit-scrollbar {
  width: 4px;
}
#liveatc-players-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.liveatc-player-card {
  width: 324px;
  background: rgba(13, 20, 36, 0.94);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65), 0 0 16px rgba(56, 189, 248, 0.12);
  overflow: hidden;
  pointer-events: auto;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.liveatc-player-card.minimized {
  width: 295px;
}
.liveatc-player-card.minimized .player-body {
  display: none;
}

/* ─── Active Stream Audio Transmission: Window Background Lights Up RED ─── */
.liveatc-player-card.stream-active {
  background: rgba(185, 28, 28, 0.88) !important;
  border-color: #ef4444 !important;
  box-shadow: 0 0 26px rgba(239, 68, 68, 0.75), 0 8px 30px rgba(0, 0, 0, 0.75) !important;
  animation: pulse-stream-active 1.4s infinite alternate ease-in-out;
}
.liveatc-player-card.stream-active .player-header {
  background: rgba(153, 27, 27, 0.95) !important;
  border-bottom-color: rgba(254, 202, 202, 0.3) !important;
}
.liveatc-player-card.stream-active .player-location-badge {
  color: #ffffff !important;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}
.liveatc-player-card.stream-active .player-status-badge {
  color: #fee2e2 !important;
}
.liveatc-player-card.stream-active .player-dot {
  background: #f87171 !important;
  box-shadow: 0 0 10px #ef4444 !important;
}
.liveatc-player-card.stream-active .player-equalizer .bar {
  background: #ffffff !important;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}
.liveatc-player-card.minimized.stream-active {
  background: rgba(185, 28, 28, 0.94) !important;
  border-color: #f87171 !important;
  box-shadow: 0 0 24px rgba(239, 68, 68, 0.85) !important;
}

@keyframes pulse-stream-active {
  0% {
    border-color: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.5), 0 6px 20px rgba(0, 0, 0, 0.6);
  }
  100% {
    border-color: #fca5a5;
    box-shadow: 0 0 28px rgba(239, 68, 68, 0.85), 0 10px 32px rgba(0, 0, 0, 0.8);
  }
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  user-select: none;
  gap: 8px;
}
.player-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.player-status-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #10b981;
  flex-shrink: 0;
}
.player-location-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 140px;
}
.player-location-badge .loc-icao {
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  flex-shrink: 0;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.65rem;
}
.player-location-badge .loc-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.liveatc-player-card.card-police {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65), 0 0 16px rgba(59, 130, 246, 0.2);
}
.liveatc-player-card.card-fire {
  border-color: rgba(239, 68, 68, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.65), 0 0 16px rgba(239, 68, 68, 0.2);
}
.player-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.player-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.player-equalizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}
.player-equalizer .bar {
  width: 2px;
  background: #38bdf8;
  border-radius: 1px;
  animation: eq 0.8s ease-in-out infinite alternate;
}
.player-equalizer .bar-1 { height: 4px; animation-delay: 0.1s; }
.player-equalizer .bar-2 { height: 10px; animation-delay: 0.3s; }
.player-equalizer .bar-3 { height: 7px; animation-delay: 0.2s; }
.player-equalizer .bar-4 { height: 12px; animation-delay: 0.4s; }
.liveatc-player-card.paused .player-equalizer .bar {
  animation: none;
  height: 2px;
}
@keyframes eq {
  0% { height: 2px; }
  100% { height: 12px; }
}
.player-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}
.player-btn-icon {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.8rem;
  border-radius: 4px;
  transition: all 0.2s;
}
.player-btn-icon:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
.player-body {
  padding: 10px 14px 12px;
}
.player-info {
  margin-bottom: 8px;
}
.player-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-subtitle {
  font-size: 0.7rem;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.player-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #10b981;
  color: #0f172a;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}
.player-play-btn:hover {
  background: #34d399;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.7);
}
.player-play-btn svg {
  width: 16px;
  height: 16px;
}
.player-volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.player-vol-icon {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}
.player-vol-icon svg {
  width: 15px;
  height: 15px;
}
.player-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  outline: none;
}
.player-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
}

/* ─── Stereo Pan Mixer Controls ─── */
.player-pan-wrap {
  margin-top: 6px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transition: border-color 0.2s, background-color 0.2s;
}
.player-pan-wrap:hover {
  background: rgba(0, 0, 0, 0.35);
  border-color: rgba(56, 189, 248, 0.3);
}

.pan-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.pan-title-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

.pan-icon {
  width: 13px;
  height: 13px;
  color: #38bdf8;
}

.pan-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.pan-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s;
}

.pan-badge.pan-center {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.pan-badge.pan-center:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.pan-badge.pan-left {
  background: rgba(59, 130, 246, 0.22);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.pan-badge.pan-right {
  background: rgba(168, 85, 247, 0.22);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.pan-control-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pan-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.2s;
}

.pan-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.pan-btn-l:hover {
  border-color: #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.pan-btn-r:hover {
  border-color: #a855f7;
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.pan-slider-track {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.pan-center-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 8px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 1px;
  pointer-events: none;
  z-index: 1;
}

.player-pan-slider {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, rgba(59, 130, 246, 0.6), rgba(255, 255, 255, 0.18) 50%, rgba(168, 85, 247, 0.6));
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.player-pan-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #0f172a;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: transform 0.15s, background-color 0.15s, box-shadow 0.15s;
}

.player-pan-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.8);
}

.player-pan-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2px solid #0f172a;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.player-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}
.player-html5-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  color: #38bdf8;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.2s;
}
.player-html5-btn:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
}

/* ─── Police Map Markers (28x28 circular pin with blue police shield badge) ─── */
.police-marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid #3b82f6;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.45), inset 0 0 6px rgba(59, 130, 246, 0.25);
  color: #60a5fa;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.police-marker-pin:hover {
  transform: scale(1.22);
  background: rgba(30, 58, 138, 0.45);
  border-color: #93c5fd;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.85);
  color: #ffffff;
  z-index: 1000 !important;
}
.police-marker-pin.is-streaming::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #3b82f6;
  border: 1.5px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 8px #60a5fa;
  animation: pulse-ring 1.5s infinite;
}

/* ─── Fire Map Markers (28x28 circular pin with red fire flame) ─── */
.fire-marker-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.45), inset 0 0 6px rgba(239, 68, 68, 0.25);
  color: #f87171;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.fire-marker-pin:hover {
  transform: scale(1.22);
  background: rgba(127, 29, 29, 0.45);
  border-color: #fca5a5;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.85);
  color: #ffffff;
  z-index: 1000 !important;
}
.fire-marker-pin.is-streaming::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border: 1.5px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 8px #f87171;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* ─── Layers & Feeds Toggle Panel ─── */
.layers-panel {
  position: fixed;
  top: 58px;
  right: 14px;
  width: 330px;
  max-height: calc(100vh - 75px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.layers-panel::-webkit-scrollbar {
  width: 5px;
}
.layers-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.layers-panel.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
}
.layers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}
.layers-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #f8fafc;
}
.layers-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}
.layers-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.layers-section {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.layers-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.layer-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.layer-toggle-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.layer-toggle-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.layer-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.layer-icon-plane {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.layer-icon-police {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.layer-icon-fire {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.layer-icon-airport {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.layer-icon-weather {
  background: rgba(14, 165, 233, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.3);
}
.layer-icon-boat {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.layer-icon-train {
  background: rgba(234, 179, 8, 0.18);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

/* Train Markers on Map */
.train-marker {
  cursor: pointer;
  transition: transform 0.25s ease-out;
}
.train-marker svg {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 5px rgba(234, 179, 8, 0.7));
  transition: filter 0.2s, transform 0.2s;
}
.train-marker:hover svg {
  filter: drop-shadow(0 0 12px rgba(254, 240, 138, 1)) drop-shadow(0 0 18px rgba(234, 179, 8, 0.95)) brightness(1.25);
  transform: scale(1.18);
}
.train-marker.selected {
  z-index: 1000 !important;
}
.train-marker.selected svg {
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1)) drop-shadow(0 0 22px rgba(234, 179, 8, 1)) brightness(1.35);
  transform: scale(1.25);
}

/* Train Track Station Pin */
.train-station-pin {
  pointer-events: none;
}
.train-station-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 14, 4, 0.92);
  border: 1.5px solid #ca8a04;
  border-radius: 14px;
  padding: 3px 8px;
  color: #fef08a;
  font-size: 0.72rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7), 0 0 12px rgba(202, 138, 4, 0.6);
  white-space: nowrap;
}
.train-station-dot {
  width: 7px;
  height: 7px;
  background: #facc15;
  border-radius: 50%;
  box-shadow: 0 0 6px #facc15;
  flex-shrink: 0;
}

/* Train Side Panel Styling */
.train-badge-icon {
  width: 52px;
  height: 52px;
  background: rgba(234, 179, 8, 0.15);
  border: 1.5px solid rgba(234, 179, 8, 0.5);
  color: #facc15;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 16px rgba(234, 179, 8, 0.3);
}
.train-route-card {
  margin: 14px 14px 4px;
  padding: 12px 14px;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.tr-route-endpoint {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.tr-endpoint-right {
  text-align: right;
}
.tr-endpoint-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #facc15;
  margin-bottom: 2px;
}
.tr-endpoint-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tr-route-arrow {
  color: rgba(250, 204, 21, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0 4px;
}

/* Boat & Marine AIS Markers */
.boat-marker {
  cursor: pointer;
  transition: transform 0.25s ease-out;
}
.boat-marker svg {
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 4px rgba(168, 85, 247, 0.6));
  transition: filter 0.2s, transform 0.2s;
}
.boat-marker:hover svg {
  filter: drop-shadow(0 0 12px rgba(192, 132, 252, 1)) brightness(1.25);
}
.boat-marker.selected {
  z-index: 1000 !important;
}
.boat-marker.selected svg {
  filter: drop-shadow(0 0 8px rgba(192, 132, 252, 1)) drop-shadow(0 0 20px rgba(168, 85, 247, 0.9)) brightness(1.4);
}

/* Boat Popup Details */
.boat-popup .leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.94) !important;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 20px rgba(168, 85, 247, 0.25) !important;
  color: #f1f5f9 !important;
  padding: 0 !important;
}
.boat-popup .leaflet-popup-content {
  margin: 0 !important;
  padding: 14px 16px !important;
  min-width: 240px;
}
.boat-popup .leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.94) !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
}
.boat-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.boat-popup-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.boat-popup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}
.boat-popup-subtitle {
  font-size: 0.72rem;
  color: #c084fc;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.boat-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.75rem;
  margin-bottom: 12px;
}
.boat-popup-stat {
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.boat-popup-stat-label {
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
}
.boat-popup-stat-val {
  font-weight: 600;
  color: #e2e8f0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
}
.boat-popup-dest {
  font-size: 0.75rem;
  color: #94a3b8;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.boat-popup-dest strong {
  color: #f1f5f9;
}
.boat-popup-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(126, 34, 206, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #e9d5ff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}
.boat-popup-link:hover {
  background: rgba(168, 85, 247, 0.5);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

/* Smooth scaling and rendering for weather radar tiles at high zoom levels */
img.weather-radar-tile,
.leaflet-tile.weather-radar-tile {
  image-rendering: auto;
  filter: contrast(1.05) saturate(1.1);
  transition: opacity 0.2s ease-out;
}


/* Weather Controls in Layers Panel */
.weather-controls {
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  margin-top: 4px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}
.weather-controls.hidden {
  display: none;
}
.weather-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.weather-ctrl-label {
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
}
.weather-slider-row input[type="range"] {
  flex: 1;
  accent-color: #38bdf8;
  height: 4px;
  cursor: pointer;
}
.weather-ctrl-val {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: #38bdf8;
  min-width: 32px;
  text-align: right;
  font-weight: 600;
}
.weather-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 6px;
}
.weather-badge-live {
  color: #34d399;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.weather-time-val {
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
}

.layer-texts {
  display: flex;
  flex-direction: column;
}
.layer-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}
.layer-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.switch-wrap {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}
.switch-wrap input {
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.15);
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.switch-wrap input:checked + .switch-slider {
  background-color: #3b82f6;
  border-color: #60a5fa;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}
.switch-wrap input:checked + .switch-slider:before {
  transform: translateX(18px);
}

/* Broadcastify Auth Section in Layers Panel */
.bcast-auth-section {
  background: rgba(0, 0, 0, 0.2);
}
.bcast-auth-tip {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0 0 10px 0;
}
.bcast-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bcast-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: #fff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bcast-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}
.bcast-btn-row {
  display: flex;
  gap: 6px;
}
.bcast-btn-save {
  flex: 1;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.bcast-btn-save:hover {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
.bcast-btn-clear {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.bcast-btn-clear:hover {
  background: rgba(239, 68, 68, 0.25);
}
.bcast-auth-status {
  font-size: 0.7rem;
  margin-top: 4px;
}
.bcast-auth-status.saved {
  color: #34d399;
}
.bcast-auth-status.empty {
  color: var(--text-muted);
}

/* ─── Broadcastify Panel ─── */
.bcast-badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
}
.bcast-badge-police {
  background: rgba(30, 58, 138, 0.35);
  border: 1.5px solid #3b82f6;
  color: #60a5fa;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.35);
}
.bcast-badge-fire {
  background: rgba(127, 29, 29, 0.35);
  border: 1.5px solid #ef4444;
  color: #f87171;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}
.bcast-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.bcast-type-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
}
.bcast-type-tag.police {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.bcast-type-tag.fire {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.bcast-listeners-tag {
  font-size: 0.68rem;
  color: #34d399;
  font-weight: 500;
}
.bcast-feed-name {
  font-size: 1rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.25;
}
.bcast-location-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.bcast-desc-card {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 14px;
}
.bcast-action-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.bcast-btn-listen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.bcast-btn-listen.btn-police {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(37, 99, 235, 0.35);
}
.bcast-btn-listen.btn-police:hover {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 0 18px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}
.bcast-btn-listen.btn-fire {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.35);
}
.bcast-btn-listen.btn-fire:hover {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.6);
  transform: translateY(-1px);
}
.bcast-btn-listen.is-playing {
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  border: 1px solid #10b981 !important;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.3) !important;
}
.bcast-btn-web {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.78rem;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  box-sizing: border-box;
}
.bcast-btn-web:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}
.bcast-nearby-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bcast-nearby-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  transition: all 0.18s;
}
.bcast-nearby-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}
.bcast-nearby-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bcast-mini-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
}
.bcast-mini-badge.police {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}
.bcast-mini-badge.fire {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}
.bcast-nearby-name {
  font-size: 0.75rem;
  color: #e2e8f0;
  max-width: 170px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bcast-nearby-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.bcast-nearby-btn:hover {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #ffffff;
}

/* ─── APRS Ham Radio Layer Styles ───────────────────────────────────────── */
.layer-icon-aprs {
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.aprs-marker-wrap {
  background: transparent;
  border: none;
}

.aprs-marker-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65), 0 0 0 1.5px rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.aprs-marker-pin:hover {
  transform: scale(1.22);
  z-index: 1000 !important;
}

.aprs-marker-pin.selected {
  transform: scale(1.3);
  box-shadow: 0 0 0 3px #10b981, 0 0 16px rgba(16, 185, 129, 0.8) !important;
}

/* Specific category pin color accents */
.aprs-marker-pin.cat-weather {
  background: radial-gradient(circle at 35% 35%, #38bdf8, #0284c7);
  color: #ffffff;
}
.aprs-marker-pin.cat-repeater {
  background: radial-gradient(circle at 35% 35%, #fbbf24, #d97706);
  color: #1e1b4b;
}
.aprs-marker-pin.cat-digipeater {
  background: radial-gradient(circle at 35% 35%, #f472b6, #db2777);
  color: #ffffff;
}
.aprs-marker-pin.cat-igate {
  background: radial-gradient(circle at 35% 35%, #2dd4bf, #0d9488);
  color: #042f2e;
}
.aprs-marker-pin.cat-mobile {
  background: radial-gradient(circle at 35% 35%, #60a5fa, #2563eb);
  color: #ffffff;
}
.aprs-marker-pin.cat-portable {
  background: radial-gradient(circle at 35% 35%, #c084fc, #9333ea);
  color: #ffffff;
}
.aprs-marker-pin.cat-base,
.aprs-marker-pin.cat-ham {
  background: radial-gradient(circle at 35% 35%, #34d399, #059669);
  color: #ffffff;
}

.aprs-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.aprs-wx-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.aprs-comment-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 14px;
  word-break: break-word;
}

.aprs-raw-packet {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: #38bdf8;
  word-break: break-all;
  line-height: 1.35;
  margin-bottom: 14px;
  max-height: 90px;
  overflow-y: auto;
  user-select: all;
}

#aprs-panel .telemetry-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
#aprs-panel .telem-card {
  padding: 10px 8px;
}
#aprs-panel .telem-value {
  font-size: 0.95rem;
  white-space: normal;
  word-break: break-word;
}
#aprs-panel .detail-val {
  word-break: break-word;
}

/* ─── Airport Runway Diagram & Mini-Map ─────────────────────────────────────── */
.ap-diagram-section {
  margin: 14px 0 16px;
}

.ap-map-mode-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ap-mode-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ap-mode-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ap-mode-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.ap-mode-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #94a3b8;
  width: 24px;
  height: 22px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 2px;
}

.ap-mode-icon-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

.ap-map-viewport {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.35);
  background: #090d16;
}

.ap-runway-mini-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #090d16;
  z-index: 1;
}

.ap-runway-vector-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0f172a 0%, #060a12 100%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ap-runway-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.ap-vector-compass {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 3px 6px;
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.ap-vector-compass .compass-n {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ef4444;
  line-height: 1;
}

.ap-vector-compass .compass-arrow {
  font-size: 0.6rem;
  color: #ef4444;
  line-height: 1;
}

.ap-map-hud-bar {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
  pointer-events: none;
}

.ap-rwy-stat-pill {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #cbd5e1;
  backdrop-filter: blur(6px);
}

.ap-recenter-btn {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #38bdf8;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.15s ease;
}

.ap-recenter-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
}

/* ─── Runway Numbers Marker Badges (High Visibility Aeronautical Styling) ─── */
.rwy-num-marker-wrap {
  background: transparent !important;
  border: none !important;
}

.rwy-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #090d16;
  color: #fbbf24;
  border: 1.5px solid #fbbf24;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.5px;
  padding: 1px 5px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 0 5px rgba(251, 191, 36, 0.5);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  user-select: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

.rwy-num-badge:hover,
.rwy-num-badge.active {
  background: #fbbf24;
  color: #090d16;
  border-color: #ffffff;
  transform: scale(1.18);
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.9);
  text-shadow: none;
}

.rwy-num-badge.wind-favored {
  border-color: #10b981;
  color: #34d399;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

/* Interactive Runway Pills */
.runway-pill {
  cursor: pointer;
  transition: all 0.15s ease;
}

.runway-pill:hover,
.runway-pill.active {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.runway-pill.wind-optimal {
  border-color: #10b981;
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
}

/* iFlightPlanner / Chart link */
.ap-ifp-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.ap-ifp-link:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* ─── Expanded Fullscreen Airport Diagram Modal ────────────────────────────── */
.ap-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  animation: fadeInModal 0.2s ease-out;
}

.ap-modal-backdrop.hidden {
  display: none !important;
}

@keyframes fadeInModal {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.ap-modal-box {
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  background: #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ap-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #0f172a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ap-modal-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.ap-modal-icao {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  font-weight: 800;
  color: #38bdf8;
}

.ap-modal-name {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
}

.ap-modal-subtitle {
  font-size: 0.78rem;
  color: #94a3b8;
}

.ap-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: all 0.15s;
}

.ap-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ffffff;
}

.ap-modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  overflow-y: auto;
  gap: 14px;
}

.ap-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ap-modal-modes {
  display: flex;
  gap: 6px;
}

.ap-modal-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-modal-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.15s;
}

.ap-modal-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.ap-modal-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

.ap-modal-link {
  font-size: 0.78rem;
  font-weight: 500;
  color: #38bdf8;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  transition: all 0.15s;
}

.ap-modal-link:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
}

.ap-modal-stage {
  position: relative;
  width: 100%;
  height: 480px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #090d16;
}

.modal-runway-map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #090d16;
  z-index: 1;
}

.modal-runway-vector-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0f172a 0%, #060a12 100%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-runway-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-compass {
  top: 14px;
  right: 14px;
  padding: 5px 9px;
}

.ap-modal-table-wrap {
  max-height: 220px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ap-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
  color: #cbd5e1;
}

.ap-modal-table th {
  background: #0f172a;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
}

.ap-modal-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: 'JetBrains Mono', monospace;
}

.ap-modal-table tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.ap-table-focus-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 0.68rem;
  cursor: pointer;
  transition: all 0.15s;
}

.ap-table-focus-btn:hover {
  background: #38bdf8;
  color: #090d16;
}

/* ─── OpenRailwayMap Yellow Railroad Track Overlay ───────────────────────── */
.railroad-track-tiles {
  /* Recolor all railway tracks to match the glowing train-yellow #facc15 */
  filter: brightness(0.9) sepia(1) saturate(1500%) hue-rotate(355deg) brightness(1.25) contrast(1.1);
  pointer-events: none;
  transition: opacity 0.25s ease;
}

/* ─── Main Map Runway Identification Badges ────────────────────────────── */
.main-rwy-badge-wrap {
  background: transparent !important;
  border: none !important;
}

.main-rwy-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 13, 22, 0.94);
  color: #facc15;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1.5px solid #facc15;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(250, 204, 21, 0.45);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.main-rwy-num-badge:hover {
  transform: scale(1.25);
  background: #facc15;
  color: #090d16;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.9);
  z-index: 2000 !important;
}

/* ─── Floating Basemap Indicator Pill (Bottom-Right of Map) ─────────────── */
.basemap-indicator {
  position: fixed;
  bottom: 24px;
  right: 18px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 0.76rem;
  color: #e2e8f0;
  font-weight: 600;
}

.basemap-indicator:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.3);
}

.basemap-indicator.sat-active {
  border-color: rgba(250, 204, 21, 0.5);
}

.bm-mode-tag {
  font-size: 0.64rem;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.basemap-indicator.sat-active .bm-mode-tag {
  background: rgba(250, 204, 21, 0.2);
  color: #facc15;
}

/* ─── Basemap Switcher Buttons in Layers Modal ──────────────────────────── */
.basemap-mode-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}

.basemap-btn {
  flex: 1;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  text-align: center;
}

.basemap-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.basemap-btn.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  font-weight: 700;
}

/* ─── Composite Aircraft Marker with Circular Airline Logo (>60% Zoom) ─── */
.ac-marker,
.ac-marker-composite {
  position: absolute !important;
  cursor: pointer;
  background: transparent !important;
  border: none !important;
  outline: none !important;
}

.ac-marker svg,
.ac-marker-composite svg {
  display: block;
}

.ac-marker-inner {
  position: relative;
  width: 36px;
  height: 36px;
  pointer-events: auto;
}

.ac-plane-rotator {
  position: absolute;
  top: 0;
  left: 0;
  width: 36px;
  height: 36px;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.75));
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.2, 1);
}

.ac-airline-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.8), 0 0 0 1.5px rgba(255, 255, 255, 0.95);
  z-index: 2;
  overflow: hidden;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ac-marker-composite:hover .ac-airline-badge {
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 0 2px #38bdf8;
  z-index: 10;
}

.ac-marker-composite.selected .ac-airline-badge {
  transform: scale(1.15);
  box-shadow: 0 0 0 2.5px #38bdf8, 0 0 14px rgba(56, 189, 248, 0.8), 0 3px 8px rgba(0, 0, 0, 0.9);
  animation: pulse-badge-glow 2s infinite ease-in-out;
}

.ac-marker-composite.selected .ac-plane-rotator svg path {
  fill: #38bdf8 !important;
  stroke: #ffffff;
  stroke-width: 1.5;
}

@keyframes pulse-badge-glow {
  0%, 100% { box-shadow: 0 0 0 2px #38bdf8, 0 0 10px rgba(56, 189, 248, 0.7); }
  50% { box-shadow: 0 0 0 3.5px #60a5fa, 0 0 18px rgba(96, 165, 250, 0.9); }
}

/* ═══════════════════════════════════════════════════════════
   Ontario 511 Traffic Cameras (511on.ca) Styling
   ═══════════════════════════════════════════════════════════ */
.camera-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.25);
}

.camera-preview-container {
  margin: 0 14px 16px;
  background: #0b0f19;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.camera-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  gap: 8px;
}

.camera-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.live-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseLiveDot 1.8s infinite;
}

@keyframes pulseLiveDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.camera-view-direction {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.camera-count-badge {
  font-size: 0.72rem;
  font-family: 'JetBrains Mono', monospace;
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.25);
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.camera-stage {
  position: relative;
  width: 100%;
  min-height: 230px;
  max-height: 310px;
  background: #05070c;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.camera-img-wrap {
  width: 100%;
  height: 100%;
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.camera-live-img {
  width: 100%;
  height: auto;
  max-height: 310px;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease;
}

.camera-loading-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #05070c;
  color: #94a3b8;
  font-size: 0.75rem;
  z-index: 5;
  transition: opacity 0.2s;
}

.camera-loading-spinner.hidden {
  display: none !important;
}

.cam-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid rgba(249, 115, 22, 0.2);
  border-top-color: #f97316;
  border-radius: 50%;
  animation: spinCam 0.8s linear infinite;
}

@keyframes spinCam {
  to { transform: rotate(360deg); }
}

.camera-error-msg {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(11, 15, 25, 0.95);
  color: #ef4444;
  font-size: 0.78rem;
  text-align: center;
  padding: 20px;
  z-index: 6;
}

.camera-error-msg.hidden {
  display: none !important;
}

.camera-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  transition: all 0.2s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.camera-nav-btn:hover {
  background: rgba(249, 115, 22, 0.9);
  border-color: #f97316;
  color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.camera-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.camera-nav-btn.disabled,
.camera-nav-btn:disabled {
  opacity: 0.2;
  cursor: default;
  pointer-events: none;
}

.camera-prev-btn { left: 8px; }
.camera-next-btn { right: 8px; }

.camera-dots-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px 4px;
}

.camera-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.camera-dot.active {
  width: 18px;
  border-radius: 4px;
  background: #f97316;
}

.camera-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 10px;
  border-top: 1px solid var(--border-subtle);
}

.cam-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.cam-action-btn:hover {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  color: #f97316;
}

.camera-timestamp {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* Orange Camera Pin Icon on Map */
.camera-marker-pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.9);
  border: 2px solid #f97316;
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.5), inset 0 0 6px rgba(249, 115, 22, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f97316;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.camera-marker-pin svg {
  width: 14px;
  height: 14px;
}

.camera-marker-pin:hover {
  transform: scale(1.25);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.85), inset 0 0 8px rgba(249, 115, 22, 0.5);
  border-color: #fb923c;
  color: #ffffff;
  background: #ea580c;
  z-index: 1000 !important;
}

.camera-marker-pin.selected {
  transform: scale(1.3);
  background: #ea580c;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 20px rgba(249, 115, 22, 1), 0 0 0 4px rgba(249, 115, 22, 0.3);
  z-index: 1100 !important;
}

/* ═══════════════════════════════════════════════════════════
   EV Charging Stations (NRCan & PlugShare) Styling
   ═══════════════════════════════════════════════════════════ */

/* Map Marker Pin */
.ev-marker-wrap {
  background: transparent;
  border: none;
}

.ev-marker-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5), inset 0 0 5px rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22c55e;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s, background-color 0.2s;
  position: relative;
}

.ev-marker-pin svg {
  width: 13px;
  height: 13px;
}

/* DC Fast Charger Marker */
.ev-marker-pin.is-fast {
  border-color: #10b981;
  background: rgba(6, 78, 59, 0.9);
  color: #34d399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.7), inset 0 0 6px rgba(52, 211, 153, 0.4);
}

.ev-marker-pin.is-fast::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 6px #f59e0b;
}

.ev-marker-pin:hover {
  transform: scale(1.28);
  border-color: #86efac;
  background: #16a34a;
  color: #ffffff;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.9), inset 0 0 8px rgba(255, 255, 255, 0.4);
  z-index: 1000 !important;
}

.ev-marker-pin.selected {
  transform: scale(1.35);
  background: #15803d;
  color: #ffffff;
  border-color: #ffffff;
  box-shadow: 0 0 22px rgba(34, 197, 94, 1), 0 0 0 4px rgba(34, 197, 94, 0.35);
  z-index: 1100 !important;
}

/* Side Panel - EV Badge Header */
.ev-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.25);
}

.ev-network-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  padding: 2px 8px;
  margin-top: 2px;
  letter-spacing: 0.03em;
}

/* 3-Column Ports & Speed Overview Banner */
.ev-stats-banner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 14px 16px;
}

.ev-stat-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.ev-stat-box.ev-box-dc {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(6, 78, 59, 0.25);
}

.ev-stat-box.ev-box-l2 {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(8, 47, 73, 0.25);
}

.ev-stat-box.ev-box-total {
  border-color: rgba(148, 163, 184, 0.25);
}

.ev-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  color: #f8fafc;
}

.ev-box-dc .ev-stat-num {
  color: #34d399;
}

.ev-box-l2 .ev-stat-num {
  color: #38bdf8;
}

.ev-stat-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

/* Connector Types List */
.ev-connectors-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 14px 16px;
}

.ev-connector-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.ev-connector-pill.pill-ccs {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.ev-connector-pill.pill-nacs {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.ev-connector-pill.pill-chademo {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.ev-connector-pill.pill-j1772 {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.3);
  color: #fde047;
}

/* Action Buttons Grid */
.ev-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 14px 20px;
}

.ev-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
}

.ev-action-btn.btn-plugshare {
  background: #0284c7;
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.25);
}

.ev-action-btn.btn-plugshare:hover {
  background: #0369a1;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
  transform: translateY(-1px);
}

.ev-action-btn.btn-nrcan {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.ev-action-btn.btn-nrcan:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #ffffff;
  transform: translateY(-1px);
}

.ev-action-btn.btn-gmaps {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
}

.ev-action-btn.btn-gmaps:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: #22c55e;
  color: #ffffff;
  transform: translateY(-1px);
}

.ev-action-btn.btn-network {
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.12);
}

.ev-action-btn.btn-network:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}


