/* ==========================================================================
   FlugWetter — METAR-Verlauf /airport/<ICAO>/metar/ (27.10.2026)
   Baut auf airport.css auf (ap-card, ap-catpill, --fc-*). Eigene Klassen: am-*.
   ========================================================================== */
.am-shell { --am-temp: #e8892b; --am-dew: #2f7fe0; --am-wind: #0e9aa7; --am-gust: #e60072;
            --am-vis: #7c4ddb; --am-qnh: #3a8fb7; }
html[data-theme="dark"] .am-shell { --am-temp: #f4a932; --am-dew: #7cb8ff; --am-wind: #4fd6c8;
            --am-gust: #ff5aa8; --am-vis: #b79bff; --am-qnh: #8fd3ef; }

.am-h1 { font: 800 clamp(22px, 3.2vw, 32px)/1.15 var(--font-sans); color: var(--text); margin: 6px 0 6px; text-wrap: balance; }
.am-lead { color: var(--muted); margin: 0 0 18px; max-width: 70ch; }
.am-h3 { font: 700 12px/1 var(--font-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 10px; }
.am-msg { color: var(--muted); padding: 10px 0; list-style: none; }
.am-count { font-weight: 500; text-transform: none; letter-spacing: 0; }

/* Spannen-Segment */
.am-range { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 999px; }
.am-seg { border: 0; background: transparent; color: var(--muted); font: 600 12px var(--font-sans); padding: 4px 10px; border-radius: 999px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.am-seg.is-on { background: var(--fc-mvfr-bg); color: #fff; }
.am-seg:focus-visible, .am-rowbtn:focus-visible, .am-morebtn:focus-visible { outline: 2px solid var(--fc-mvfr); outline-offset: 2px; }

/* Flugkategorie-Streifen */
.am-stbar { position: relative; height: 26px; border-radius: 6px; overflow: hidden;
            background: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--muted) 14%, transparent) 6px 7px); }
.am-st { position: absolute; top: 0; bottom: 0; }
.am-st[data-cat="VFR"]  { background: var(--fc-vfr-bg); }
.am-st[data-cat="MVFR"] { background: var(--fc-mvfr-bg); }
.am-st[data-cat="IFR"]  { background: var(--fc-ifr-bg); }
.am-st[data-cat="LIFR"] { background: var(--fc-lifr-bg); }
.am-st[data-cat=""]     { background: var(--fc-unknown); }
.am-ticks { position: relative; height: 20px; margin-top: 2px; }
.am-tk { position: absolute; top: 2px; transform: translateX(-50%); font: 500 10px var(--font-mono); color: var(--muted); white-space: nowrap; }
.am-tk.is-day { color: var(--text); font-weight: 700; }
.am-tk::before { content: ''; position: absolute; left: 50%; top: -6px; height: 5px; border-left: 1px solid var(--line); }
.am-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font: 600 11px var(--font-mono); color: var(--muted); }
.am-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.am-leg[data-cat="VFR"] i { background: var(--fc-vfr-bg); }  .am-leg[data-cat="MVFR"] i { background: var(--fc-mvfr-bg); }
.am-leg[data-cat="IFR"] i { background: var(--fc-ifr-bg); }  .am-leg[data-cat="LIFR"] i { background: var(--fc-lifr-bg); }

/* Rohe Liste */
.am-list { list-style: none; margin: 0; padding: 0; }
.am-row { border-top: 1px solid var(--line); }
.am-row:first-child { border-top: 0; }
.am-rowbtn { width: 100%; display: grid; grid-template-columns: 92px auto 1fr 18px; align-items: center; gap: 12px;
             background: none; border: 0; color: inherit; text-align: left; padding: 9px 4px; cursor: pointer; border-radius: 8px; }
.am-rowbtn:hover { background: color-mix(in srgb, var(--fc-mvfr) 8%, transparent); }
.am-time { display: flex; flex-direction: column; line-height: 1.2; font-variant-numeric: tabular-nums; }
.am-time b { font: 700 13px var(--font-mono); color: var(--text); }
.am-time small { font-size: 11px; color: var(--muted); }
.am-raw { font: 500 13px/1.45 var(--font-mono); color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.am-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: center; transition: transform .2s; }
.am-row.is-open .am-chev { transform: rotate(-135deg); }
.am-more { text-align: center; }
.am-morebtn { margin-top: 10px; border: 1px solid var(--line); background: var(--ap-card-bg); color: var(--text); font: 600 13px var(--font-sans); padding: 8px 16px; border-radius: 999px; cursor: pointer; }

/* Dekodierte Grafik */
.am-dec { padding: 4px 4px 14px; }
.am-dk { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 2fr); gap: 14px; padding: 14px;
         border: 1px solid var(--line); border-left: 4px solid var(--fc-unknown); border-radius: 10px; background: var(--ap-card-bg); }
.am-dk[data-cat="VFR"] { border-left-color: var(--fc-vfr-bg); }  .am-dk[data-cat="MVFR"] { border-left-color: var(--fc-mvfr-bg); }
.am-dk[data-cat="IFR"] { border-left-color: var(--fc-ifr-bg); }  .am-dk[data-cat="LIFR"] { border-left-color: var(--fc-lifr-bg); }
.am-dk-wind { display: flex; gap: 14px; align-items: center; }
.am-wr { width: 104px; height: 104px; flex: none; }
.am-wr-ring { fill: none; stroke: var(--line); stroke-width: 2; }
.am-wr-tk { stroke: var(--muted); stroke-width: 1.5; }
.am-wr-n { fill: var(--muted); font: 700 10px var(--font-sans); text-anchor: middle; }
.am-wr-ar { stroke: var(--am-wind); stroke-width: 4; stroke-linecap: round; }
.am-wr-head { fill: var(--am-wind); }
.am-dk-k { font: 700 10.5px var(--font-sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.am-dk-v { font: 700 16px/1.25 var(--font-sans); color: var(--text); font-variant-numeric: tabular-nums; margin-top: 2px; }
.am-dk-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.am-dk-gust { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--fc-ifr-bg); color: #fff; font: 700 12px var(--font-sans); }
.am-dk-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.am-dk-t { padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--muted) 8%, transparent); }
.am-dk-clouds { grid-column: 1 / -1; }
.am-cl { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.am-cl li { display: grid; grid-template-columns: 90px auto auto 1fr; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.am-cl-bar { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--muted) 15%, transparent); overflow: hidden; }
.am-cl-bar i { display: block; height: 100%; background: var(--muted); }
.am-cl small { color: var(--muted); }
.am-cl-ft { justify-self: end; font: 600 13px var(--font-mono); font-variant-numeric: tabular-nums; }

/* Verlauf */
.am-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.am-ch { margin: 0; }
.am-ch figcaption { font: 600 12px var(--font-sans); color: var(--text); margin-bottom: 4px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.am-ch svg { width: 100%; height: auto; display: block; overflow: visible; }
.am-gl { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.am-gv { stroke-dasharray: 2 3; }
.am-gy { fill: var(--muted); font: 10px var(--font-mono); text-anchor: end; }
.am-gx { fill: var(--muted); font: 10px var(--font-mono); text-anchor: middle; }
.am-ln { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.am-dot { stroke: none; } .am-dot.is-gust { fill: var(--am-gust); }
.am-ln.is-temp { stroke: var(--am-temp); } .am-ln.is-dew { stroke: var(--am-dew); }
.am-ln.is-wind { stroke: var(--am-wind); } .am-ln.is-gust { stroke: var(--am-gust); stroke-dasharray: 3 2; }
.am-ln.is-vis  { stroke: var(--am-vis); }  .am-ln.is-qnh { stroke: var(--am-qnh); }
.am-key { font-weight: 500; color: var(--muted); }
.am-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.am-key.is-temp i { background: var(--am-temp); } .am-key.is-dew i { background: var(--am-dew); }
.am-key.is-wind i { background: var(--am-wind); } .am-key.is-gust i { background: var(--am-gust); width: 7px; height: 7px; border-radius: 50%; }
.am-tablewrap { overflow-x: auto; }
.am-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.am-table th, .am-table td { padding: 7px 10px; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); color: var(--text); }
.am-table thead th { border-top: 0; font: 700 10.5px var(--font-sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.am-table th[scope="row"], .am-table thead th:first-child { text-align: left; }
.am-table td:last-child { text-align: center; }

@media (max-width: 640px) {
  .am-rowbtn { grid-template-columns: 70px 1fr 14px; }
  .am-rowbtn .ap-catpill { grid-column: 2; grid-row: 1; justify-self: start; }
  .am-rowbtn .am-raw { grid-column: 1 / -1; grid-row: 2; }
  .am-rowbtn .am-chev { grid-column: 3; grid-row: 1; }
  .am-dk { grid-template-columns: 1fr; }
  .am-cl li { grid-template-columns: 60px auto auto 1fr; }
}
@media (prefers-reduced-motion: reduce) { .am-chev { transition: none; } }
