:root {
  --panel-bg: #12172bee;
  --panel-border: #ffffff1a;
  --text: #eef1f7;
  --text-dim: #9aa4b8;
  --accent: #4f7cff;
  --g: #22c55e;
  --b: #22b8ea;
  --o: #f59e0b;
  --r: #ef4444;
  --purple: #a855f7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #0b1622;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
}

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #0b1622;
}

/* Standaard daglicht OpenStreetMap-tiles — geen filter toegepast */
.leaflet-container { background: #0b1622; }

/* Search bar */
#search-bar {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: min(420px, 90vw);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  gap: 10px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px #0006;
}
.search-icon { width: 18px; height: 18px; fill: var(--text-dim); flex: none; }
#search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  width: 100%;
}
#search-input::placeholder { color: var(--text-dim); }
#search-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
  display: none;
  max-height: 260px;
  overflow-y: auto;
}
#search-results.show { display: block; }
.search-row {
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--panel-border);
}
.search-row:hover { background: #ffffff10; }
.search-row b { color: var(--text); }
.search-row span { color: var(--text-dim); margin-left: 6px; }

/* Aircraft markers */
.plane-icon { pointer-events: auto; }
.plane-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.plane-svg { width: 34px; height: 34px; filter: drop-shadow(0 0 2px #000a); }
.plane-label {
  margin-top: 2px;
  background: #000000d9;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  color: #fff;
  text-align: center;
  box-shadow: 0 1px 4px #0007;
  pointer-events: none; /* clicks pass through to whatever's actually
    underneath — prevents a label overlapping a neighbouring aircraft's
    icon from "stealing" clicks meant for that other plane */
}
.plane-label .cs { color: var(--text-dim); }

/* Top-right controls: fullscreen + mobile callsign-info quick toggle */
#top-controls {
  position: absolute;
  top: 40px;
  right: 14px;
  z-index: 650;
  display: flex;
  gap: 6px;
}
#top-controls button {
  display: flex; align-items: center; gap: 5px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px #0006;
}
#top-controls button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#top-controls button.active { color: #fff; border-color: var(--accent); background: #1b2440; }

/* Right-side vertical menu bar — extensible: add more .side-menu-item
   buttons here, each with its own data-panel target id. */
#side-menu {
  position: absolute;
  top: 84px;
  right: 14px;
  z-index: 650;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 6px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 18px #0006;
}
.side-menu-item {
  width: 34px; height: 34px;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.side-menu-item svg { width: 18px; height: 18px; fill: currentColor; }
.side-menu-item.active { background: var(--accent); color: #fff; }
.side-menu-item:hover:not(.active) { color: var(--text); background: #ffffff14; }

.side-panel {
  position: absolute;
  top: 84px;
  right: 60px;
  z-index: 640;
  width: 260px;
  max-height: 70vh;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px #0008;
  display: flex;
  flex-direction: column;
}
#airports-panel.hidden { display: none; }
.side-panel.hidden { display: none; }
.side-panel-icon { width: 13px; height: 13px; fill: currentColor; vertical-align: -2px; margin-right: 4px; }
#airports-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 8px; border-bottom: 1px solid var(--panel-border);
}
#airports-pager button {
  background: #ffffff14; border: none; color: var(--text); width: 24px; height: 24px;
  border-radius: 6px; cursor: pointer; font-size: 14px;
}
#airports-page-label { font-size: 11px; color: var(--text-dim); }
#airports-list { overflow-y: auto; }
.airport-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--panel-border); cursor: pointer;
}
.airport-row:hover { background: #ffffff0a; }
/* ATC live audio player bar */
#atc-player-bar {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 750;
  background: #10182aee;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px #0008;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(480px, 92vw);
  flex-wrap: wrap;
}
#atc-player-bar.hidden { display: none; }
#atc-player-close {
  background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px; flex: none;
}
#atc-player-name { font-size: 13px; font-weight: 700; flex: none; min-width: 70px; }
#atc-player-toggle {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--accent);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex: none;
}
#atc-player-toggle svg { width: 15px; height: 15px; fill: currentColor; }
#atc-player-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); flex: 1; min-width: 90px; }
#atc-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--r); animation: atc-live-pulse 1.4s ease-in-out infinite; }
#atc-live-label { color: var(--r); font-weight: 700; letter-spacing: .04em; }
@keyframes atc-live-pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
#atc-volume-wrap { display: flex; align-items: center; gap: 5px; flex: none; }
#atc-volume-wrap svg { width: 15px; height: 15px; fill: var(--text-dim); }
#atc-volume { width: 70px; accent-color: var(--accent); }
#atc-player-hint {
  width: 100%; font-size: 10.5px; color: var(--text-dim); line-height: 1.4;
  border-top: 1px solid var(--panel-border); padding-top: 8px; margin-top: 2px;
}

/* News ticker */
#news-ticker {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 550;
  height: 26px;
  background: #0d1220e6;
  border-bottom: 1px solid var(--panel-border);
  overflow: hidden;
  display: flex;
  align-items: center;
}
#news-ticker.hidden { display: none; }
#news-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-scroll 60s linear infinite;
  font-size: 12px;
  color: var(--text-dim);
}
#news-ticker-track span { margin-right: 48px; }
#news-ticker-track span.live-event { color: #fbbf24; font-weight: 600; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Live Airport Cams panel */
.cam-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--panel-border); cursor: pointer;
}
.cam-row:hover { background: #ffffff0a; }
.cam-row-icon {
  width: 30px; height: 30px; border-radius: 7px; background: #ef4444;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.cam-row-icon svg { width: 15px; height: 15px; fill: #fff; }
.cam-row-name { font-size: 13px; font-weight: 700; }

/* Europees luchtruim panel (accordion of countries) */
#europe-panel { max-height: 60vh; }
.hint { font-size: 11px; color: var(--text-dim); line-height: 1.4; }
.europe-group { border-bottom: 1px solid var(--panel-border); }
.europe-group-header {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; color: var(--text); font-size: 12.5px; font-weight: 700;
  padding: 10px 14px; cursor: pointer;
}
.europe-chevron { color: var(--text-dim); transition: transform .15s; font-size: 10px; }
.europe-group-header.open .europe-chevron { transform: rotate(180deg); }
.europe-group-body.hidden { display: none; }
.europe-group-body .airport-row { padding-left: 22px; }

/* Embed modal (for custom menu links / cams that support iframing) */
#embed-modal {
  position: absolute;
  inset: 60px 14px 60px 14px;
  z-index: 900;
  background: #0c1220f5;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px #000a;
}
#embed-modal.hidden { display: none; }
#embed-modal-header {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; border-bottom: 1px solid var(--panel-border);
}
#embed-modal-title { font-size: 13px; font-weight: 700; flex: 1; }
#embed-modal-newtab { font-size: 12px; color: var(--accent); text-decoration: none; }
#embed-modal-close { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 14px; }
#embed-modal-frame { flex: 1; width: 100%; border: none; background: #000; }

.airport-row-icon {
  width: 30px; height: 30px; border-radius: 7px; background: #16d16a;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.airport-row-icon svg { width: 16px; height: 16px; fill: #fff; }
.airport-row-name { font-size: 13px; font-weight: 700; }
.airport-row-code { font-size: 11px; color: var(--text-dim); margin-top: 1px; }

/* Panels (events/info) */
#events-panel {
  position: absolute;
  top: 60px;
  right: 14px;
  z-index: 600;
  width: 320px;
  max-height: 70vh;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px #0008;
  display: flex;
  flex-direction: column;
}
#events-panel.hidden { display: none; }
.events-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--panel-border);
}
.events-header button {
  background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px;
}
#events-list { overflow-y: auto; }

.event-row {
  padding: 10px 14px;
  border-bottom: 1px solid var(--panel-border);
  font-size: 12.5px;
  cursor: pointer;
}
.event-row:hover { background: #ffffff0a; }
.event-row .ev-top { display: flex; justify-content: space-between; align-items: baseline; }
.event-row .ev-cs { font-weight: 700; }
.event-row .ev-type { font-weight: 600; }
.event-row .ev-type.descent { color: var(--r); }
.event-row .ev-type.goaround { color: var(--o); }
.event-row .ev-time { color: var(--text-dim); font-size: 11px; }
.event-row .ev-detail { color: var(--text-dim); margin-top: 2px; }
.event-row .ev-loc { color: var(--text-dim); margin-top: 2px; display:flex; align-items:center; gap:4px;}
.empty-state { padding: 20px 14px; color: var(--text-dim); font-size: 12.5px; text-align: center; }

/* Detail panel */
#detail-panel {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 700;
  width: 300px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  background: #0c1220ee;
  border: 1px solid #2a3550;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px #000a, 0 0 0 1px #22c55e12 inset;
}
#detail-panel.hidden { display: none; }
#detail-panel.minimized #detail-photo-wrap,
#detail-panel.minimized .detail-body { display: none; }
.detail-header {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  gap: 4px;
}
.detail-header button {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: none;
  background: #00000066;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
#detail-photo-wrap { position: relative; width: 100%; height: 130px; background: #0006; overflow: hidden; border-radius: 12px 12px 0 0; }
#detail-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
#detail-photo-credit {
  position: absolute; bottom: 4px; left: 8px;
  font-size: 9px; color: #ffffffb0; text-shadow: 0 1px 2px #000;
}
.detail-body { padding: 12px 14px 14px; }
.detail-title-row {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
#detail-callsign { font-size: 17px; font-weight: 800; letter-spacing: .04em; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.badge {
  font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 3px;
  background: var(--g); color: #06210f; letter-spacing: .04em;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
}
.badge-dim { background: #ffffff14; color: var(--text-dim); font-weight: 600; border: 1px solid #ffffff1a; }
.badge-btn { background: #ffffff14; color: var(--text-dim); cursor: pointer; border: 1px solid var(--panel-border); }
.badge-btn.active { background: var(--accent); color: #fff; }
#detail-typeline { margin-top: 6px; font-size: 12.5px; color: var(--text-dim); }
#detail-country { font-size: 12px; color: var(--text-dim); opacity: .8; margin-top: 1px; }

.detail-section { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--panel-border); }
.section-label { font-size: 10px; letter-spacing: .06em; color: var(--text-dim); margin-bottom: 8px; }

.route-airports { display: flex; align-items: center; gap: 8px; }
.route-airport { flex: 1; background: #ffffff0d; border-radius: 8px; padding: 8px 10px; }
.route-airport-dest { text-align: right; }
.route-airport span:first-child { display: block; font-size: 14px; font-weight: 800; color: var(--accent); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.route-airport span:last-child { display: block; font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.route-arrow { color: var(--g); font-size: 14px; }
.route-progress-track { height: 6px; border-radius: 3px; background: #ffffff14; margin-top: 10px; overflow: hidden; }
#route-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--g), var(--b)); border-radius: 3px; }
.route-stats { display: flex; justify-content: space-between; margin-top: 8px; }
.route-stats div { text-align: center; flex: 1; }
.route-stats span { display: block; font-size: 13px; font-weight: 700; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.route-stats small { font-size: 9px; color: var(--text-dim); letter-spacing: .04em; }

#pfd { width: 100%; height: auto; border-radius: 4px; background: #060a14; border: 1px solid #22c55e2e; box-shadow: 0 0 12px #22c55e14 inset; }
.compass-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
#compass { width: 96px; height: 96px; flex: none; background: #0b1220; border-radius: 50%; }
.vs-indicator {
  flex: 1; background: #ffffff0d; border-radius: 8px; padding: 8px 10px; text-align: center;
}
.vs-indicator .section-label { margin: 0 0 2px; }
#vs-arrow { font-size: 20px; font-weight: 800; line-height: 1; }
#vs-arrow.climb { color: var(--g); }
#vs-arrow.descend { color: var(--r); }
#vs-arrow.level { color: var(--text-dim); }
#vs-value { font-size: 16px; font-weight: 800; margin-top: 2px; }
.vs-indicator small { font-size: 9px; color: var(--text-dim); }
.sel-row { display: flex; gap: 10px; margin-top: 8px; }
.sel-row div { flex: 1; background: #ffffff0d; border-radius: 8px; padding: 6px 10px; text-align: center; }
.sel-row span { display: block; font-size: 15px; font-weight: 800; color: var(--g); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; text-shadow: 0 0 6px #22c55e55; }
.sel-row small { font-size: 9px; color: var(--text-dim); letter-spacing: .04em; }
#nav-modes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.nav-mode-chip {
  font-size: 10px; padding: 4px 8px; border-radius: 6px;
  background: #ffffff0d; color: var(--text-dim); border: 1px solid var(--panel-border);
}
.nav-mode-chip.active { background: var(--g); color: #06210f; border-color: var(--g); font-weight: 700; }

#air-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ad-cell { background: #ffffff0a; border: 1px solid #ffffff10; border-radius: 4px; padding: 6px 10px; }
.ad-cell span { display: block; font-size: 13px; font-weight: 700; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.ad-cell small { font-size: 9px; color: var(--text-dim); letter-spacing: .05em; }
#detail-footer { margin-top: 10px; font-size: 10px; color: var(--text-dim); opacity: .7; }

@media (max-width: 600px) {
  #detail-panel { width: 92vw; left: 4vw; }
}

/* Airport icons */
.airport-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.airport-wind {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  background: #0d1220e6;
  border-radius: 4px;
  padding: 1px 5px;
  margin-bottom: 2px;
}
.airport-name {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: #0d1220e6;
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
  text-align: center;
}

/* Airport popup (Leaflet) */
.airport-popup-wrap .leaflet-popup-content-wrapper {
  background: #10182aee;
  color: var(--text);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}
.airport-popup-wrap .leaflet-popup-tip { background: #10182aee; }
.airport-popup-wrap .leaflet-popup-content { margin: 12px 14px; width: 230px !important; }
.ap-title { font-size: 15px; font-weight: 800; color: var(--accent); }
.ap-sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.ap-cards { display: flex; gap: 6px; margin-top: 10px; }
.ap-card { flex: 1; background: #ffffff0d; border-radius: 8px; padding: 6px 8px; }
.ap-card small { display: block; font-size: 8px; color: var(--text-dim); letter-spacing: .03em; }
.ap-card span { display: block; font-size: 12px; font-weight: 700; margin-top: 2px; }
.ap-runway { font-size: 11px; color: var(--g); margin-top: 8px; }
.ap-table { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; border-top: 1px solid var(--panel-border); padding-top: 8px; }
.ap-table small { display: block; font-size: 8px; color: var(--text-dim); letter-spacing: .03em; }
.ap-table span { display: block; font-size: 11.5px; font-weight: 600; margin-top: 1px; }
.ap-webcam-btn {
  display: block; text-align: center; margin-top: 10px; padding: 7px;
  background: var(--accent); color: #fff; border-radius: 7px; font-size: 12px;
  font-weight: 700; text-decoration: none;
}
.ap-atc-label { font-size: 10px; color: var(--text-dim); letter-spacing: .04em; margin-top: 10px; }
.ap-atc-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.atc-btn {
  background: #ffffff0d; border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 6px; padding: 4px 8px; font-size: 11px; cursor: pointer;
}
.atc-btn.playing { background: var(--g); color: #06210f; border-color: var(--g); }

/* Pulsing selection highlight */
.pulse-wrap { position: relative; width: 0; height: 0; pointer-events: none; }
.pulse-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #ffe14d;
  box-shadow: 0 0 8px #ffe14dcc;
  animation: pulse-ring-anim 1.4s ease-out infinite;
}
.pulse-ring.delay { animation-delay: 0.7s; }
.pulse-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #ffe14d;
  box-shadow: 0 0 4px #000c;
}
@keyframes pulse-ring-anim {
  0%   { transform: scale(0.5); opacity: 1; }
  70%  { opacity: 0.35; }
  100% { transform: scale(3.4); opacity: 0; }
}

/* Automatic red alarm ring — appears around an aircraft the moment a new
   emergency descent / go-around alert fires for it, no click needed. */
.alert-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 26px; height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: transparent;
  border: 4px solid #ef4444;
  box-shadow: 0 0 14px #ef4444dd;
  animation: alert-ring-anim 1.1s ease-out infinite;
}
.alert-ring.delay { animation-delay: 0.55s; }
.alert-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #000c;
}
@keyframes alert-ring-anim {
  0%   { transform: scale(0.5); opacity: 1; }
  70%  { opacity: 0.4; }
  100% { transform: scale(4.2); opacity: 0; }
}

/* Bottom status bar (aircraft count, updated time, source, clock, weather) */
#status-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  min-height: 30px;
  background: #0b1018f0;
  border-top: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  align-content: flex-start;
  gap: 8px 14px;
  padding: 4px 12px;
  font-size: 10.5px;
  color: var(--text-dim);
  flex-wrap: wrap;
}
#status-brand { display: flex; align-items: center; gap: 6px; flex: none; }
#status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--g); box-shadow: 0 0 4px var(--g); animation: atc-live-pulse 1.8s ease-in-out infinite; }
#status-brand img { width: 18px; height: 18px; border-radius: 50%; }
#status-title { font-size: 11px; font-weight: 700; color: var(--text); line-height: 1.1; }
#status-sub { font-size: 9px; color: var(--text-dim); line-height: 1.1; }
#status-pills { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
.status-pill { white-space: nowrap; }
.status-pill:not(:last-child)::after { content: '·'; margin-left: 10px; color: var(--panel-border); }

.status-toggle {
  display: flex; align-items: center; gap: 4px;
  background: transparent; border: none; color: var(--text-dim);
  font-size: 10.5px; cursor: pointer; padding: 0; flex: none;
}
.status-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.status-toggle.active { color: var(--accent); }

#alt-gradient { display: flex; align-items: center; gap: 6px; flex: none; font-size: 8px; color: var(--text-dim); letter-spacing: .03em; }
#alt-gradient .gradient-bar { width: 80px; height: 5px; border-radius: 3px; background: linear-gradient(90deg, #22d3ee, #22c55e, #eab308, #f97316, #ef4444); }
#alt-gradient .gradient-ticks { width: 80px; display: flex; justify-content: space-between; font-size: 7px; color: var(--text-dim); }

@media (max-width: 700px) {
  #status-bar { height: auto; min-height: 30px; flex-wrap: wrap; padding: 4px 10px; gap: 6px 12px; }
  #status-sub { display: none; }
}

/* Standalone logo, back bottom-left, with the old Info content as a
   click-to-open tooltip (native title attrs can't hold links/formatting). */
#site-logo-wrap {
  position: absolute;
  bottom: 40px;
  left: 14px;
  z-index: 500;
}
#site-logo {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 2px 6px #0008);
  cursor: pointer;
}
#site-logo-tooltip {
  position: absolute;
  bottom: 72px;
  left: 0;
  width: 260px;
  background: #10182aee;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 12px 14px;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px #0008;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}
#site-logo-tooltip.hidden { display: none; }
#site-logo-tooltip p { margin: 0 0 8px; }
#site-logo-tooltip p:last-child { margin-bottom: 0; }
#site-logo-tooltip a { color: var(--accent); }
@media (max-width: 600px) {
  #site-logo { width: 46px; height: 46px; }
  #site-logo-wrap { bottom: 36px; left: 10px; }
  #site-logo-tooltip { width: 78vw; }
}

#attribution a { color: inherit; text-decoration: underline; }
#attribution {
  position: absolute;
  bottom: 34px;
  right: 8px;
  z-index: 400;
  font-size: 10px;
  color: #1a1a1a;
  background: #ffffffb0;
  padding: 1px 6px;
  border-radius: 4px;
}
#zoom-controls {
  position: absolute;
  right: 14px;
  bottom: 40px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
#zoom-in, #zoom-out, #reset-view {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}
#reset-view { font-size: 10px; font-weight: 700; letter-spacing: .02em; margin-top: 4px; }
#scale-badge {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 10px;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  #events-panel { width: 92vw; right: 4vw; top: 62px; }
  .side-panel { width: 82vw; right: 4vw; top: 130px; }
  #side-menu { right: 4vw; }
  #top-controls { flex-wrap: wrap; justify-content: flex-end; width: 82vw; right: 4vw; }
  #top-controls button span { display: none; }
  #embed-modal { inset: 130px 4vw 60px 4vw; }
}
/* Settings panel — toggle switch */
.settings-body { padding: 14px; }
.settings-toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  cursor: pointer; font-size: 12.5px; color: var(--text);
}
.settings-toggle-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.settings-switch {
  position: relative; flex: none; width: 38px; height: 22px;
  background: #ffffff1a; border-radius: 12px; transition: background .15s;
}
.settings-switch::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  background: #fff; border-radius: 50%; transition: transform .15s;
}
.settings-toggle-row input:checked + .settings-switch { background: var(--accent); }
.settings-toggle-row input:checked + .settings-switch::before { transform: translateX(16px); }

/* When aircraft labels are hidden, only the plane icon itself remains visible */
/* When "Toon info" is off, labels stay hidden by default but reveal on
   rollover (mouse hover) — desktop only, there's no hover on touch
   devices, so mobile users just tap the icon to open the detail panel
   instead. */
.hide-plane-labels .plane-label { display: none; }
.hide-plane-labels .plane-wrap:hover .plane-label { display: block; }

/* Instellingen → "Toon vliegvelden op de kaart" */
.hide-airports .airport-wrap { display: none; }

/* Settings panel — altitude selection accordion */
.settings-group-header {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: none; border-bottom: 1px solid var(--panel-border);
  color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer;
  padding: 0 0 10px; margin-bottom: 10px;
}
.settings-group-header.open .europe-chevron { transform: rotate(180deg); }
.settings-group-body { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.settings-group-body.hidden { display: none; }
.alt-filter-btn {
  background: transparent; border: 1px solid var(--panel-border); color: var(--text-dim);
  border-radius: 20px; padding: 6px 12px; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}
.alt-filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-g { background: #22c55e; }
.dot-b { background: #eab308; }
.dot-o { background: #f97316; }
.dot-r { background: #ef4444; }

/* Smartphone-only: keep just Events + Airline in the bottom status bar,
   drop everything else (brand, live stats, altitude legend) to save
   space on a small screen. Matches the site's existing phone breakpoint
   (600px) used elsewhere — tablets (768px+) and desktop stay untouched. */
@media (max-width: 600px) {
  #status-brand, #status-pills, #alt-gradient { display: none; }
  #status-bar { justify-content: center; gap: 10px; }
}

/* Quick callsign-info toggle — desktop/tablet already has this in the
   Instellingen panel, so this shortcut button only shows on smartphone. */
#btn-callsign-mobile { display: none; }
#btn-callsign-mobile svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#btn-callsign-mobile.active { color: var(--accent); border-color: var(--accent); }

/* Smartphone: hide the fullscreen label/button to save space, keep the
   callsign-info quick toggle. Tablet/desktop unchanged. */
@media (max-width: 600px) {
  #btn-fullscreen { display: none; }
  #btn-callsign-mobile { display: flex; }
}
