/* The virtual airline's map and flight pages. */
.va-map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; margin-bottom: 24px; }
.va-map { position: relative; min-height: 560px; overflow: hidden; border: 1px solid var(--line, #17305c); border-radius: 12px; background: #0a1430; }
.va-map-flight { min-height: 440px; margin-bottom: 24px; }
.va-map-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; max-height: 560px; }
.va-map-side section.panel + section.panel { margin-top: 0; }
.va-map-list { margin: 0; flex: 1 1 auto; min-height: 120px; overflow-y: auto; }
.va-map-detail { margin: 0; flex: 0 0 auto; }
.va-map-weather { margin: 0; flex: 0 0 auto; }
.va-map-weather-switch { margin: 0; }
.va-map-weather p { margin: 6px 0 0; }
.va-map-weather p:empty { display: none; }
.va-map-detail[hidden] { display: none; }
.va-map-detail #va-map-detail-note:empty { display: none; }
.va-map-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0; font-variant-numeric: tabular-nums; }
.va-map-facts dt { color: var(--muted, #adcdea); font-size: 13px; }
.va-map-facts dd { margin: 0; font-weight: 600; }
.va-map-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
/* The pill style would otherwise show a hidden Flight page or Follow button. */
.va-map-detail-actions [hidden] { display: none; }
.va-map-pick { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; cursor: pointer; }
.va-map-flights-item.is-selected .va-map-pick { color: #fff; }
.va-plane-selected svg { filter: drop-shadow(0 0 2px #0a1430) drop-shadow(0 0 6px #fff); }
.va-map-note { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.va-map-flights-item { padding: 10px 0; border-bottom: 1px solid var(--line, #17305c); }
.va-map-flights-item:last-child { border-bottom: 0; }
.va-map-flights-item a { font-weight: 700; }
.va-map-flights-item .va-map-values { display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }

.va-plane { width: 30px; height: 30px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.va-plane svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 2px #0a1430); }
.va-plane:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 50%; }
/* Free flights (outside the airline) have their own colour; the list carries a key. */
.va-map-key { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0 10px; border-bottom: 1px solid var(--line, #17305c); list-style: none; }
.va-map-key-item { display: inline-flex; align-items: center; gap: 6px; }
.va-map-key-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

section.panel + section.panel { margin-top: 16px; }
.va-replay { display: flex; align-items: center; gap: 12px; }
.va-replay input[type="range"] { flex: 1; min-width: 0; }
.va-replay-now { margin: 10px 0 0; font-variant-numeric: tabular-nums; }

.va-profile { position: relative; }
.va-profile svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.va-profile-tip { position: absolute; top: 0; padding: 4px 8px; border: 1px solid var(--line, #17305c); border-radius: 6px; background: #0d1a3a; font-size: 13px; white-space: nowrap; pointer-events: none; transform: translateX(-50%); font-variant-numeric: tabular-nums; }

/* Filling the tracker app's page. */
.va-map-app-page { margin: 0; padding: 0; background: #050b1f; }
.va-map-app-page .va-map-layout { box-sizing: border-box; height: 100vh; margin: 0; padding: 12px; gap: 12px; }
.va-map-app-page .va-map { min-height: 0; }
.va-map-app-page .va-map-side { max-height: none; min-height: 0; gap: 12px; }

/* The pilot's own map of where they've flown, filling the tracker's Home card. */
.va-flown-page .va-flown { display: flex; flex-direction: column; height: 100vh; padding: 0; box-sizing: border-box; }
.va-flown-page .va-map { flex: 1 1 auto; min-height: 0; border-radius: 10px; }
.va-flown-key { margin: 6px 2px 0; color: var(--muted, #adcdea); }

/* Phones: the map on top, the list below. */
@media (max-width: 860px) {
  .va-map-layout { grid-template-columns: minmax(0, 1fr); }
  .va-map { min-height: 380px; }
  .va-map-side { max-height: none; }
  .va-map-list { max-height: none; }
  .va-map-flight { min-height: 320px; }
}
