/* flight-map.css: the Live air traffic map widget (cms/widgets/flight_map.py). Altitude colours are fixed (they mean
   heights); frames, buttons and text follow the theme (--p primary, --i ink, --s surface, --radius). */
.tw-flight-map { --fm-ink: var(--i, #1B1D1F); --fm-surf: var(--s, #fff); --fm-line: color-mix(in srgb, var(--fm-ink) 14%, transparent);
  --fm-soft: color-mix(in srgb, var(--fm-ink) 5%, var(--fm-surf)); --fm-muted: color-mix(in srgb, var(--fm-ink) 62%, var(--fm-surf));
  --fm-head: var(--p, #1E3A5F); --fm-red: #C0392B; --fm-gold: #C4A35A; }
.tw-flight-map .fm-intro { margin-bottom: 18px; }
.tw-flight-map .fm-intro p { max-width: 760px; }
.tw-flight-map .fm-outer { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.fm-live { position: relative; background: #E9EEF1; border-radius: var(--radius, 10px); overflow: hidden; border: 1px solid var(--fm-line);
  box-shadow: 0 18px 40px -30px rgba(0,0,0,.45); color: var(--fm-ink); font-size: 16px; line-height: 1.45; }
.fm-live .fm-mapwrap { position: relative; min-height: 0; }
.fm-live .fm-map { position: absolute; inset: 0; }
.fm-compact { height: var(--fm-h, 460px); }
.fm-compact .fm-mapwrap { position: absolute; inset: 0; }
.fm-badge { position: absolute; left: 10px; top: 10px; z-index: 3; margin: 0; background: rgba(20,36,58,.92); color: #fff; padding: 7px 12px; border-radius: 6px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fm-full { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: var(--fm-h, calc(100vh - 140px)); min-height: 520px; }
.fm-live .fm-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #3FBF7F; flex: none; animation: fm-pulse 2s infinite; }
@keyframes fm-pulse { 0% { box-shadow: 0 0 0 0 rgba(63,191,127,.7); } 70% { box-shadow: 0 0 0 8px rgba(63,191,127,0); } 100% { box-shadow: 0 0 0 0 rgba(63,191,127,0); } }
.fm-live .fm-side { display: flex; flex-direction: column; min-height: 0; background: var(--fm-surf); border-right: 1px solid var(--fm-line); }
.fm-live .fm-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.fm-live .fm-head { padding: 14px 16px 12px; background: var(--fm-head); color: #EEF1F4; }
.fm-live .fm-title { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; font-size: 1.4rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.fm-live .fm-sum { margin: 0; font-size: .95rem; }
.fm-live .fm-sum b { color: #fff; }
.fm-live .fm-updated { font-size: .82rem; opacity: .78; }
.fm-live .fm-tools { padding: 10px 12px; display: grid; gap: 8px; border-bottom: 1px solid var(--fm-line); }
.fm-live .fm-q { font: inherit; padding: 9px 11px; border: 2px solid var(--fm-line); border-radius: 4px; background: var(--fm-surf); color: var(--fm-ink); width: 100%; box-sizing: border-box; }
.fm-live .fm-q:focus { outline: 3px solid var(--fm-gold); outline-offset: 1px; }
.fm-live .fm-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: .85rem; color: var(--fm-muted); }
.fm-live .fm-row select { font: inherit; padding: 3px 6px; border: 1px solid var(--fm-line); border-radius: 4px; background: var(--fm-surf); color: var(--fm-ink); }
.fm-live .fm-hide { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fm-live .fm-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; }
.fm-live .fm-list li { margin: 0; border-bottom: 1px solid var(--fm-line); }
.fm-live .fm-list button { display: grid; grid-template-columns: 12px 1fr auto auto; align-items: center; gap: 10px; width: 100%; padding: 9px 14px; border: 0; background: none;
  color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fm-live .fm-list button:hover, .fm-live .fm-list button:focus-visible { background: var(--fm-soft); outline: none; }
.fm-live .fm-list button[aria-pressed="true"] { background: color-mix(in srgb, var(--fm-gold) 22%, var(--fm-surf)); box-shadow: inset 4px 0 0 var(--fm-gold); }
.fm-live .fm-list i { width: 12px; height: 12px; border-radius: 3px; }
.fm-live .fm-cs { font-weight: 700; letter-spacing: .02em; }
.fm-live .fm-ty { font-size: .82rem; color: var(--fm-muted); font-variant-numeric: tabular-nums; }
.fm-live .fm-al { font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 78px; text-align: right; }
.fm-live .fm-empty { padding: 16px; color: var(--fm-muted); }
.fm-live .fm-note { margin: 0; padding: 10px 14px; font-size: .78rem; color: var(--fm-muted); border-top: 1px solid var(--fm-line); }
.fm-live .fm-detail:empty { display: none; }
.fm-live .fm-detail { border-top: 3px solid var(--fm-gold); max-height: 58%; overflow-y: auto; }
.fm-live .fm-card { position: relative; padding: 14px 16px 12px; }
.fm-live .fm-card h3 { margin: 2px 0 8px; font-size: 1.6rem; line-height: 1.1; letter-spacing: .02em; }
.fm-live .fm-kicker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--fm-muted); }
.fm-live .fm-kicker i { width: 10px; height: 10px; border-radius: 2px; }
.fm-live .fm-alert { margin: 0 0 8px; padding: 6px 10px; border-radius: 4px; background: var(--fm-red); color: #fff; font-weight: 700; }
.fm-live .fm-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin: 0; }
.fm-live .fm-facts div { min-width: 0; }
.fm-live .fm-facts dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--fm-muted); }
.fm-live .fm-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fm-live .fm-type { margin: 12px 0 0; }
.fm-live .fm-type a { display: inline-block; padding: 8px 12px; border-radius: 4px; background: var(--fm-head); color: #fff; font-weight: 700; text-decoration: none; }
.fm-live .fm-type a:hover, .fm-live .fm-type a:focus-visible { background: color-mix(in srgb, var(--fm-head) 80%, #000); }
.fm-live .fm-links { margin: 10px 0 0; font-size: .85rem; }
.fm-live .fm-close { position: absolute; top: 8px; right: 10px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--fm-soft); color: var(--fm-ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.fm-live .fm-tabs { display: none; }
.fm-live .fm-legend { position: absolute; left: 10px; bottom: 10px; z-index: 3; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 2px 8px;
  padding: 6px 10px; background: rgba(255,255,255,.93); border-radius: 6px; font-size: .72rem; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,.12); pointer-events: none; }
.fm-live .fm-ramp { display: block; width: 170px; height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, #2F6F57 0%, #5E9C5C 12.5%, #C4A35A 25%, #5B8DB8 50%, #1E3A5F 75%, #6B3FA0 100%); }
.fm-live .fm-ticks { grid-column: 2; display: flex; justify-content: space-between; width: 170px; }
.fm-live .fm-ticks b { font-weight: 600; }
.fm-compact .fm-legend { display: none; }
.fm-live .fm-mapbtns { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; gap: 6px; }
.fm-live .fm-mapbtns button { font: 700 .82rem/1 inherit; font-family: inherit; padding: 8px 11px; border-radius: 4px; border: 1px solid rgba(0,0,0,.18); background: rgba(255,255,255,.95); color: #333; cursor: pointer; }
.fm-live .fm-mapbtns button[aria-pressed="true"] { background: var(--fm-head); color: #fff; border-color: var(--fm-head); }
.fm-live .fm-rest { position: absolute; top: 54px; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; padding: 8px 14px; border-radius: 6px; background: rgba(20,36,58,.92); color: #fff; font-size: .9rem; max-width: 90%; text-align: center; }
.fm-live .fm-fallback { display: none; position: absolute; inset: 0; z-index: 4; place-items: center; text-align: center; padding: 20px; background: #E9EEF1; }
.fm-live.fm-failed .fm-fallback { display: grid; }
.fm-live .maplibregl-ctrl-attrib { font-size: 11px; }
.fm-live .maplibregl-canvas:focus-visible { outline: 3px solid var(--fm-gold); outline-offset: -3px; }
@media (max-width: 860px) {
  .fm-full { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: auto; min-height: 0; }
  .fm-full .fm-side { border-right: 0; }
  .fm-full .fm-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--fm-line); }
  .fm-full .fm-tabs button { flex: 1; padding: 10px; border: 0; background: var(--fm-soft); font: 700 .9rem/1 inherit; font-family: inherit; color: var(--fm-muted); cursor: pointer; }
  .fm-full .fm-tabs button[aria-pressed="true"] { background: var(--fm-surf); color: var(--fm-ink); box-shadow: inset 0 -3px 0 var(--fm-gold); }
  .fm-full[data-view="map"] .fm-body .fm-tools, .fm-full[data-view="map"] .fm-list, .fm-full[data-view="map"] .fm-note { display: none; }
  .fm-full[data-view="list"] .fm-mapwrap { display: none; }
  .fm-full .fm-mapwrap { height: 70vh; min-height: 380px; }
  .fm-full[data-view="list"] .fm-list { max-height: 70vh; }
  .fm-full .fm-detail { max-height: none; }
  .fm-live .fm-legend { bottom: 28px; }
  .fm-live .fm-ramp, .fm-live .fm-ticks { width: 130px; }
}
@media (prefers-reduced-motion: reduce) { .fm-live .fm-dot { animation: none; } }
