/* Weather on the map (shared by both sites; markup from js/weather.js) */

/* The strip: a chip beside the map's top-left controls that opens the forecast */
.wx-strip { min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border); box-shadow: 0 2px 10px var(--shadow); display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; font-family: inherit; line-height: 1.15; white-space: nowrap; }
.wx-strip[hidden] { display: none; }
.wx-strip .wx-icon { flex: none; color: var(--text-muted); }
.wx-text { display: flex; flex-direction: column; }
.wx-main { font-size: 0.85rem; font-weight: 600; }
.wx-sub { font-size: 0.72rem; color: var(--text-muted); }

/* A report's weather: one line in its details */
.wx-line { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem; font-size: 0.8rem; color: var(--text-main); }
.wx-line .wx-icon { flex: none; color: var(--text-muted); }
.wx-line-text { flex: 1; min-width: 0; }
.wx-line-when { color: var(--text-muted); }
.wx-line-link { flex: none; color: var(--accent); font-weight: 600; text-decoration: none; padding: 0.35rem 0 0.35rem 0.5rem; }
.wx-line-link::after { content: ' ›'; }

/* Weather alerts cover the strip's point: it says so, and opens the alerts */
.wx-strip.wx-alerting { border-color: var(--caution, #d97706); }
.wx-alert { color: var(--caution, #d97706); font-weight: 600; }

/* A place's "Weather" link (a launch's card) */
.wx-place-link { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--accent); font-weight: 600; text-decoration: none; }
.wx-place-link .wx-icon { flex: none; }

/* The ice growth estimate: a chip beside the strip and the panel it opens. An estimate from the
   weather, kept apart from the reports' colours: blue while building, grey holding, amber weakening; never green. */
.wx-ice-chip { min-height: 44px; padding: 0 12px; border-radius: 12px; background: var(--card-bg); color: var(--text-main); border: 1px dashed var(--text-muted); box-shadow: 0 2px 10px var(--shadow); display: inline-flex; align-items: center; gap: 0.45rem; font-family: inherit; line-height: 1.15; white-space: nowrap; text-align: left; cursor: pointer; }
.wx-ice-chip[hidden], .wx-ice-panel[hidden] { display: none; }
.wx-ice-chip[aria-expanded="true"] { border-style: solid; border-color: var(--text-main); }
.wx-ice-cue { flex: none; color: var(--text-muted); }
[data-status="building"] .wx-ice-cue { color: var(--accent); }
[data-status="weakening"] .wx-ice-cue { color: var(--caution, #d97706); }
.wx-ice-spin { animation: wx-ice-spin 0.9s linear infinite; }
@keyframes wx-ice-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wx-ice-spin { animation: none; } }
.wx-ice-panel { width: min(330px, calc(100vw - 20px)); padding: 10px 12px 12px; border-radius: 14px; background: var(--card-bg); color: var(--text-main); border: 1px dashed var(--text-muted); box-shadow: 0 8px 30px var(--shadow); font-size: 0.82rem; line-height: 1.4; }
.wx-ice-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wx-ice-tag { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); }
.wx-ice-close { flex: none; width: 44px; height: 32px; margin: -6px -10px -2px 0; background: none; border: none; color: var(--text-muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.wx-ice-title { display: flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; font-weight: 700; }
.wx-ice-detail, .wx-ice-caution { margin: 0.35rem 0 0; }
.wx-ice-caution { padding: 6px 8px; border-radius: 8px; background: var(--fill, rgba(127, 127, 127, 0.12)); font-weight: 500; }
.wx-ice-source { margin-top: 0.45rem; font-size: 0.72rem; color: var(--text-muted); }

/* Lightning nearby: a banner above the strip, in the feed's own words. Amber while it is in the
   area, red when the nearest strike is close (data-near, js/weather.js LIGHTNING_NEAR_KM). */
.wx-lightning { width: min(330px, calc(100vw - 20px)); padding: 7px 10px; border-radius: 12px; background: var(--card-bg); color: var(--text-main); border: 2px solid var(--caution, #d97706); box-shadow: 0 2px 10px var(--shadow); display: flex; align-items: flex-start; gap: 0.45rem; line-height: 1.25; }
.wx-lightning[hidden] { display: none; }
.wx-lightning .wx-icon { flex: none; margin-top: 1px; color: var(--caution, #d97706); }
.wx-lt-head { font-size: 0.9rem; font-weight: 700; }
.wx-lt-detail { font-size: 0.78rem; }
.wx-lightning[data-near="true"] { background: #c81e1e; border-color: #c81e1e; color: #fff; }
.wx-lightning[data-near="true"] .wx-icon { color: #fff; }

/* The two-day outlook: a chip after the strip and the panel it opens (the ice estimate's layout, solid
   border). A forecast model's steps, quieter than the weather alerts on the strip. */
.wx-out-chip { min-height: 44px; max-width: min(210px, calc(100vw - 110px)); padding: 0 12px; border-radius: 12px; background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border); box-shadow: 0 2px 10px var(--shadow); display: inline-flex; align-items: center; gap: 0.45rem; font-family: inherit; line-height: 1.15; white-space: nowrap; text-align: left; cursor: pointer; }
.wx-out-chip[hidden], .wx-out-panel[hidden] { display: none; }
.wx-out-chip .wx-icon { flex: none; color: var(--text-muted); }
.wx-out-chip .wx-text { min-width: 0; }
.map-chips-row { max-width: calc(100vw - 20px); }
.map-chips-row .wx-out-chip { flex: 0 1 auto; min-width: 0; }
.wx-out-chip .wx-main { overflow: hidden; text-overflow: ellipsis; }
.wx-out-chip[aria-expanded="true"] { border-color: var(--text-main); }
.wx-out-panel { width: min(330px, calc(100vw - 20px)); padding: 10px 12px 12px; border-radius: 14px; background: var(--card-bg); color: var(--text-main); border: 1px solid var(--border); box-shadow: 0 8px 30px var(--shadow); font-size: 0.82rem; line-height: 1.4; }
.wx-steps { display: flex; gap: 6px; margin: 0.5rem -12px 0; padding: 0 12px 6px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.wx-step { flex: none; min-width: 74px; padding: 5px 7px; border-radius: 8px; background: var(--fill, rgba(127, 127, 127, 0.12)); display: grid; grid-template-rows: auto auto auto 1.3em auto; align-content: start; row-gap: 1px; font-size: 0.74rem; line-height: 1.25; white-space: nowrap; }
.wx-step-when { font-size: 0.68rem; color: var(--text-muted); }
.wx-step-temp, .wx-step-wind { font-weight: 600; }
.wx-step-gust { font-size: 0.68rem; font-weight: 600; color: var(--caution, #d97706); }
.wx-step-wet { font-size: 0.68rem; color: var(--text-muted); white-space: normal; max-width: 86px; }
.wx-out-note { margin: 0.35rem 0 0; font-size: 0.72rem; color: var(--text-muted); }
/* The boat map: the wind leads each step */
.wx-out-windy .wx-step-wind { order: -1; font-size: 0.86rem; font-weight: 700; }
.wx-out-windy .wx-step-when { order: -2; }
.wx-out-windy .wx-step-gust { order: -1; font-size: 0.74rem; }
.wx-out-windy .wx-step { grid-template-rows: auto auto 1.3em auto auto; }
