/* map.css — flight path labels, aircraft markers, popups, Leaflet controls.
   From concept/live-air-traffic.html (lines 774–781, 838–893). Linked from index.html in a fixed
   order that keeps the cascade identical to the concept. */
/* Flight path labels (speed / altitude / time), ADS-B Exchange style */
.path-label { background: none; border: 0; }
.path-label span {
  display: block; white-space: nowrap; font: 700 11px/1.2 var(--font); color: #fff;
  font-variant-numeric: tabular-nums; pointer-events: none;
  text-shadow: 0 0 3px #000, 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
}

/* Pinned aircraft on the map */
.ac.is-pinned .ac-label { border-left-color: var(--warn); }
.ac.is-pinned .ac-glyph { filter: drop-shadow(0 0 3px var(--warn)) drop-shadow(0 0 1px rgba(0, 0, 0, 0.9)); }

/* ---------- Aircraft markers ---------- */
.ac-icon { background: none; border: 0; }
.ac { position: relative; width: 26px; height: 26px; color: var(--c); }
.ac-glyph { display: block; width: 26px; height: 26px; filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)); }
.ac-glyph path { fill: currentColor; stroke: rgba(5, 10, 20, 0.85); stroke-width: 0.8; }
.ac.no-heading .ac-glyph { opacity: 0.8; }
.ac.is-ground { opacity: 0.8; }

/* The label sits beside the plane and does NOT rotate with it */
.ac-label {
  position: absolute; left: 25px; top: 4px;
  padding: 3px 6px; white-space: nowrap;
  font-size: 11px; line-height: 1.1;
  color: #EEF3FA; background: rgba(10, 18, 32, 0.72);
  border-left: 2px solid var(--c); border-radius: 4px;
  cursor: pointer; /* clicking the label opens the flight, same as the plane */
}
.hide-labels .ac:not(.is-selected) .ac-label,
.ac.is-ground:not(.is-selected) .ac-label { display: none; }

.ac.is-selected .ac-glyph { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.ac.is-selected .ac-label { background: var(--accent); color: var(--night); border-left-color: var(--accent); font-weight: 700; }

/* ---------- Popup ---------- */
.ac-popup .leaflet-popup-content-wrapper,
.ac-popup .leaflet-popup-tip { background: #101C30; color: var(--text); border: 1px solid var(--edge); }
.ac-popup .leaflet-popup-content-wrapper { border-radius: 12px; }
.ac-popup .leaflet-popup-content { margin: 12px 14px; font: 13px/1.4 var(--font); min-width: 230px; }
.ac-popup a.leaflet-popup-close-button { color: var(--muted); }
.pop-head { display: flex; gap: 10px; align-items: center; padding-right: 14px; }
.pop-logo { width: 32px; height: 32px; flex: none; border-radius: 6px; background: #fff; object-fit: contain; padding: 2px; box-sizing: border-box; }
.pop-title { font-size: 15px; font-weight: 700; }
.pop-sub { color: var(--muted); font-size: 12px; }
.route { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: start; margin-top: 10px; padding: 8px 0; border-top: 1px solid var(--edge); border-bottom: 1px solid var(--edge); }
.route .code { font-size: 16px; font-weight: 700; }
.route .place { color: var(--muted); font-size: 11.5px; }
.route .dest { text-align: right; }
.route .arrow { color: var(--muted); padding-top: 2px; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 9px 0 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pop-note { margin-top: 8px; font-size: 11.5px; color: var(--muted); }

/* ---------- Leaflet controls, dark ---------- */
.leaflet-bar a, .leaflet-bar a:hover { background: var(--panel); color: var(--text); border-bottom-color: var(--edge); }
.leaflet-bar { border: 1px solid var(--edge) !important; }
.leaflet-top.leaflet-right { top: env(safe-area-inset-top, 0px); }
.leaflet-control-attribution { background: rgba(12, 22, 38, 0.72) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--accent); }
.leaflet-container { font-family: var(--font); }


