/* Layout primitives, header, typography, layers and controls live in the platform's forecast-contract.css. */
.apc-nowcast__badge{display:block;font-size:16px;color:#fff}.apc-nowcast__toolbar [data-product-label]{display:none}
.apc-nowcast [data-basemap],.apc-nowcast [data-satellite-disc]{position:absolute;inset:0;width:100%;height:100%}.apc-nowcast [data-satellite-disc]{z-index:1}.apc-nowcast.is-disc [data-basemap]{visibility:hidden}
.apc-nowcast__zoom{position:absolute;top:15px;left:15px;display:grid;z-index:3}.apc-nowcast__zoom button{width:38px;height:38px;background:#fff;color:var(--forecast-navy);border:1px solid var(--forecast-line);font-size:25px}.apc-nowcast__zoom button:first-child{border-radius:8px 8px 0 0}.apc-nowcast__zoom button:last-child{border-radius:0 0 8px 8px}
.apc-nowcast__legend{position:absolute;z-index:3;top:15px;right:15px;max-width:min(400px,calc(100% - 82px));padding:10px 14px;color:var(--forecast-ink);background:#fffffff0;border:1px solid var(--forecast-line);border-radius:10px;font-size:11px;box-shadow:0 3px 10px #0002;cursor:auto}.apc-nowcast__legend strong{display:block;margin-bottom:7px;font-size:12px}.apc-nowcast__swatches,.apc-nowcast__ticks{display:flex;justify-content:space-between}.apc-nowcast__swatches span{flex:1;min-width:30px;border-top:8px solid transparent;padding-top:3px}.apc-nowcast__phases{display:flex;flex-wrap:wrap;gap:10px;max-height:150px;overflow:auto}.apc-nowcast__phases span{border-left:6px solid;padding-left:6px}.apc-nowcast__gradient{height:9px;border-radius:5px;min-width:240px}.apc-nowcast__ticks{font-size:10px;margin-top:4px;gap:6px}.apc-nowcast__legend [data-overlay-legend]{margin-top:8px;border-top:1px solid var(--forecast-line);padding-top:6px}
.apc-nowcast__status{position:absolute;z-index:4;bottom:40px;left:15px;right:15px;padding:10px 14px;background:#fffffff0;border-radius:8px;color:var(--forecast-ink);pointer-events:none}.apc-nowcast__credit{position:absolute;z-index:3;bottom:0;left:0;right:0;padding:4px 10px;color:var(--forecast-muted);background:#ffffffe8;font-size:10px}.apc-nowcast__sample{position:absolute;z-index:3;bottom:40px;right:14px;color:#fff;background:#8b481de8;padding:4px 8px;font-size:9px;pointer-events:none}

.apc-nowcast__overlays,.apc-nowcast__settings{padding:8px 14px;background:#f7fafb;font-size:12px;color:var(--forecast-ink)}.apc-nowcast__overlays{border-bottom:1px solid var(--forecast-line)}.apc-nowcast summary{cursor:pointer;font-weight:650}.apc-nowcast__overlays>div{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:8px 0}.apc-nowcast__overlays label,.apc-nowcast__settings label{display:inline-flex;align-items:center;gap:8px;margin:6px 12px 0 0}.apc-nowcast__overlays p{margin:3px 0;font-size:11px}.apc-nowcast__overlays p:empty{display:none}.apc-nowcast input[type=checkbox]{accent-color:var(--forecast-cyan)}.apc-nowcast__settings select,.apc-nowcast__overlays select{width:auto;max-width:250px;min-height:34px;padding:4px 8px;color:var(--forecast-ink);background:#fff;border:1px solid var(--forecast-line);border-radius:8px}.apc-nowcast__foot{padding:12px 18px;border-top:1px solid var(--forecast-line);color:var(--forecast-muted);font-size:12px}.apc-nowcast__foot p{margin:0 0 4px}.apc-nowcast__foot span{font-size:11px}
@media(max-width:1020px){.apc-nowcast .apc-forecast__workspace{grid-template-columns:220px minmax(0,1fr)}}
@media(max-width:760px){.apc-nowcast .apc-forecast__workspace{display:block;min-height:0}.apc-nowcast__products{display:none}.apc-nowcast__toolbar{flex-wrap:wrap}.apc-nowcast__toolbar .apc-forecast__model{flex:1 1 100%}.apc-nowcast__toolbar .apc-forecast__model select{flex:1;width:100%;min-width:0}.apc-nowcast__toolbar [data-product-label]{display:flex;align-items:center;gap:8px;flex:1;min-width:0;font-size:12px}.apc-nowcast__toolbar [data-product-label] select{width:100%;min-width:0;padding:8px;color:var(--forecast-navy);background:#f4f8fa;border:1px solid var(--forecast-line);border-radius:8px}.apc-nowcast .apc-nowcast__layers .apc-forecast__map-options-menu{position:relative;inset:auto;max-height:none;box-shadow:none}.apc-nowcast__legend{top:10px;right:10px;font-size:10px;padding:8px;max-width:calc(100% - 70px)}.apc-nowcast__gradient{min-width:180px}.apc-nowcast__swatches span{min-width:25px}.apc-nowcast__credit{font-size:9px}.apc-nowcast__map{height:510px;min-height:360px}.apc-nowcast .apc-forecast__toolbar-actions{margin-left:0}.apc-nowcast__settings label{flex-wrap:wrap}.apc-nowcast__settings select{max-width:100%}}
/* Stable rows: network state never participates in card layout. */
.apc-nowcast__status{left:14px;right:auto;bottom:38px;max-width:calc(100% - 28px);padding:0;background:none;border:0;border-radius:0;box-shadow:none;font-size:12px;font-weight:650;color:#fff;text-shadow:0 1px 3px #102d3b,0 0 4px #102d3b}
.apc-nowcast__overlays [data-overlay-times],.apc-nowcast__overlays [data-overlay-times]:empty{display:block;height:1.6em;line-height:1.6;min-height:1.6em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:3px 0}
.apc-nowcast__product-group{border-bottom:1px solid var(--forecast-line);margin:0;padding:0}
.apc-nowcast__product-group>summary{padding:11px 10px;color:var(--forecast-navy);font-size:12px;list-style-position:inside}
.apc-nowcast .apc-forecast__layer-list .apc-nowcast__product-group>button{width:100%;text-align:left}
.apc-nowcast__archive{display:flex;align-items:center;gap:10px;margin:0;font-size:12px;color:var(--forecast-ink)}
.apc-nowcast__archive label{display:flex;align-items:center;gap:8px}
.apc-nowcast__archive input,.apc-nowcast__archive button{font:inherit;color:inherit;min-height:34px;border:1px solid var(--forecast-line);border-radius:8px;background:#fff;padding:4px 9px;touch-action:manipulation}
.apc-nowcast__archive[hidden]{display:none!important}
.apc-nowcast .apc-forecast__export{max-width:min(740px,calc(100vw - 24px))}
.apc-nowcast__product-group button em{white-space:nowrap}

@media(max-width:760px){.apc-nowcast__archive input{font-size:16px}.apc-nowcast__legend{max-width:calc(100% - 74px)}}

.apc-nowcast__foot [data-refresh-status]{display:block;margin-top:4px;}

.apc-nowcast__toolbar{flex-wrap:wrap}
.apc-nowcast__toolbar .apc-forecast__model{flex:1 1 245px;min-width:0}
.apc-nowcast__toolbar .apc-forecast__model select{width:100%;min-width:0}
.apc-nowcast__toolbar .apc-nowcast__archive{flex:0 1 auto;flex-wrap:wrap}
@media(max-width:760px){.apc-nowcast__toolbar .apc-nowcast__archive{flex:1 1 100%}.apc-nowcast__archive input{max-width:170px}.apc-nowcast .apc-forecast__map-options{position:relative;inset:auto}}

/* Legend remains inside the map; opening it never moves the timeline. */
.apc-nowcast__map{overflow:hidden}
.apc-nowcast__legend-toggle{position:absolute;z-index:4;top:12px;right:12px;display:flex;align-items:center;gap:7px;min-height:40px;padding:6px 10px;border:1px solid var(--forecast-line);border-radius:8px;background:#fffffff2;color:var(--forecast-ink);font:600 12px var(--forecast-font,system-ui);touch-action:manipulation}
.apc-nowcast__legend-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.apc-nowcast__legend-panel{position:absolute;z-index:4;top:60px;right:12px;width:min(340px,calc(100% - 72px));max-height:calc(100% - 116px);display:flex;flex-direction:column;border:1px solid var(--forecast-line);border-radius:var(--forecast-radius,10px);background:#fffffff5;color:var(--forecast-ink);box-shadow:0 3px 10px #0002;visibility:hidden;opacity:0;pointer-events:none;transition:opacity .15s ease,visibility .15s}
.apc-nowcast__legend-panel.is-open{visibility:visible;opacity:1;pointer-events:auto}
.apc-nowcast__legend-panel.is-drawer{top:0;right:0;bottom:32px;max-height:none;width:min(360px,calc(100% - 60px));border-radius:0;transform:translateX(100%);transition:transform .2s ease,opacity .15s ease,visibility .2s}
.apc-nowcast__legend-panel.is-drawer.is-open{transform:translateX(0)}
.apc-nowcast__legend-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:5px 10px 5px 14px;border-bottom:1px solid var(--forecast-line);font-size:13px}
.apc-nowcast__legend-head button{min-width:36px;min-height:36px;border:0;border-radius:6px;background:transparent;color:inherit;font-size:24px;touch-action:manipulation}
.apc-nowcast__legend-scroll{overflow:auto;overscroll-behavior:contain;padding:12px 14px;min-height:0}
.apc-nowcast .apc-nowcast__legend{position:static;max-width:none;padding:0;background:none;border:0;border-radius:0;box-shadow:none;font-size:11px}
.apc-nowcast__legend .apc-nowcast__categories{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
.apc-nowcast__categories span{display:block;border-left:6px solid;padding-left:8px;line-height:1.5;overflow-wrap:anywhere}
.apc-nowcast__legend .apc-nowcast__phases{max-height:none;gap:8px 12px;overflow:visible}
.apc-nowcast__legend .apc-nowcast__gradient{min-width:0;width:100%;margin:7px 0}
.apc-nowcast__lightning-tools{border-top:1px solid var(--forecast-line);margin-top:12px;padding-top:10px;font-size:12px}
.apc-nowcast__lightning-tools label{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;margin:0 0 9px}
.apc-nowcast__lightning-tools small{display:block;color:var(--forecast-muted);font-size:11px;line-height:1.5}
.apc-nowcast__lightning-tools select,.apc-nowcast__speed select{font:inherit;min-height:34px;padding:4px 8px;background:#fff;border:1px solid var(--forecast-line);border-radius:8px;color:var(--forecast-ink);max-width:100%}
.apc-nowcast [data-lightning-tools][hidden],.apc-nowcast [data-count-setting][hidden],.apc-nowcast [data-point-settings][hidden]{display:none!important}
.apc-nowcast__overlays .apc-nowcast__display-fields{border-top:1px solid var(--forecast-line)}
.apc-nowcast__speed{display:flex;align-items:center;gap:10px;margin-top:14px;color:var(--forecast-muted);font-size:12px}
.apc-nowcast__overlays input,.apc-nowcast__overlays select,.apc-nowcast__legend-panel select{touch-action:manipulation}
@media(max-width:760px){.apc-nowcast__overlays>div{gap:7px}.apc-nowcast__overlays label{margin-right:0;max-width:100%;flex-wrap:wrap}.apc-nowcast__overlays select{max-width:100%}.apc-nowcast__legend-panel select{font-size:16px}.apc-nowcast__legend-toggle{top:10px;right:10px}.apc-nowcast__legend-panel{right:10px}}
@media(prefers-reduced-motion:reduce){.apc-nowcast__legend-panel,.apc-nowcast__legend-panel.is-drawer{transition:none}}
/* Keep the source and parameter usable beside the common icon buttons. */
@media(max-width:760px){
 .apc-nowcast .apc-nowcast__toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;overflow:visible}
 .apc-nowcast__toolbar .apc-forecast__model,.apc-nowcast__toolbar .apc-nowcast__archive{grid-column:1/-1;width:100%}
 .apc-nowcast__toolbar [data-product-label]{grid-column:1;display:grid;grid-template-columns:minmax(0,1fr);gap:3px}
 .apc-nowcast__toolbar .apc-forecast__toolbar-actions{grid-column:2;align-self:end}
 .apc-nowcast__toolbar select{font-size:16px}}
/* Each layer owns its switch and opacity; no tall detached slider column. */
.apc-nowcast__overlays .apc-nowcast__overlay-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;padding:12px;align-items:stretch}
.apc-nowcast__weather-card{min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:12px;padding:12px;background:#fff;border:1px solid #d5e2e8;border-radius:10px}
.apc-nowcast__overlays .apc-nowcast__weather-choice{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;font-size:12px;font-weight:650;min-height:38px}
.apc-nowcast__weather-choice>.apc-search-select{flex:1 1 140px}.apc-nowcast__weather-choice>input[type=checkbox]{accent-color:#006c9c;width:17px;height:17px;margin:0}
.apc-nowcast__overlays .apc-nowcast__weather-opacity{display:grid;grid-template-columns:auto minmax(50px,1fr) 42px;align-items:center;gap:8px;margin:0;font-size:11px;color:#587888}
.apc-nowcast__weather-opacity input[type=range]{width:100%;min-width:0;height:18px;accent-color:#006c9c;margin:0;padding:0}.apc-nowcast__weather-opacity output{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums;color:#17394a}
.apc-nowcast__overlays .apc-nowcast__weather-note{margin:0;padding:0 12px 12px;font-size:11px;color:#607d8b;line-height:1.5}
.apc-nowcast__quickviews{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid #d5e2e8}.apc-nowcast__quickviews>button{border:1px solid #c5d7e0;background:#f4f8fa;color:#175473;border-radius:7px;padding:6px 10px;font-size:11px;font-weight:700;cursor:pointer}.apc-nowcast__quickviews>span{font-size:10px;color:#607d8b;flex:1 1 230px}
@media(max-width:520px){.apc-nowcast__overlays .apc-nowcast__overlay-fields{grid-template-columns:1fr}.apc-nowcast__weather-card{gap:8px}.apc-nowcast__quickviews>span{flex-basis:100%}}

@media(hover:hover) and (pointer:fine){.apc-nowcast__legend-panel.is-open{opacity:.24}.apc-nowcast__legend-panel.is-open:hover,.apc-nowcast__legend-panel.is-open:focus-within{opacity:1}}
.apc-nowcast.has-map-sidebar [data-product-label]{display:none!important}
.apc-nowcast.is-disc [data-coordinate-canvas],.apc-nowcast.is-disc [data-marker-open],.apc-nowcast.is-disc .apc-forecast__markers{display:none}
