/* Passive widgets, matching Wetterweb's Soft Weather cards. */
#widgets { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
#widgets[hidden] { display:none; }
.weather-widget { container-type:inline-size; min-width:0; min-height:158px; display:flex; flex-direction:column; gap:9px; padding:13px; border:1px solid #d8e5f2; border-radius:16px; background:linear-gradient(145deg,#fff,#f2f7fc); box-shadow:0 5px 14px #254d7520; }
.widget-heading { display:flex; align-items:center; gap:8px; min-width:0; }
.widget-heading h3 { margin:0; font-size:13px; line-height:1.35; font-weight:650; overflow-wrap:anywhere; }
.widget-heading .sensor-icon { flex:none; width:34px; height:34px; padding:7px; border:1px solid color-mix(in srgb,currentColor 14%,transparent); border-radius:50%; background:color-mix(in srgb,currentColor 9%,var(--surface)); }
.widget-main { display:grid; grid-template-columns:minmax(0,1fr); align-items:center; gap:8px; min-height:49px; }
.widget-main.has-sparkline { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); }
.widget-main .reading-value { font-size:clamp(20px,10cqi,26px); font-weight:700; letter-spacing:-.035em; overflow-wrap:anywhere; }
.widget-main .reading-unit { font-size:.65em; }
.widget-sparkline { width:100%; height:48px; overflow:hidden; color:var(--widget-color); }
.widget-sparkline path { stroke-linejoin:round; stroke-linecap:round; }
.widget-stats { display:grid; gap:4px; margin-top:auto; font-size:12px; }
.widget-stat { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px; }
.widget-stat.is-min { color:var(--minimum); }
.widget-stat.is-max { color:var(--maximum); }
.widget-stat time { font-size:11px; }
.widget-stats .extras { margin:0; }
.weather-widget[data-type="rain"] .reading-value,
.weather-widget[data-type="rain"] .reading-number,
.weather-widget[data-type="rain"] .reading-unit,
.weather-widget[data-type="rain"] .widget-stat > span:nth-child(2) { font-weight:700; }
.widget-rain-fields { display:flex; flex-wrap:wrap; gap:10px 18px; }
.widget-rain-field { min-width:0; }
.widget-rain-label { display:block; color:var(--muted); font-size:11px; margin-bottom:3px; }
.widget-rain-fields .reading-value { font-size:clamp(18px,8cqi,24px); }
.widget-rain-rate-meter { width:100%; margin:2px 0 4px; }
.widget-rain-rate-bar { height:9px; width:100%; overflow:hidden; border-radius:999px; background:var(--surface-soft); border:1px solid var(--line); }
.widget-rain-rate-fill { display:block; height:100%; border-radius:inherit; }
.widget-rain-rate-scale { display:flex; justify-content:space-between; gap:8px; margin-top:4px; color:var(--muted); font-size:10px; font-weight:700; line-height:1.3; }
.widget-rain-rate-bar.is-missing { border-style:dashed; }
body.dark-mode .weather-widget { background:linear-gradient(145deg,#25394e,#1b2d40); border-color:#3a5068; box-shadow:0 5px 14px #07152440; }
body.dark-mode .widget-sparkline { color:color-mix(in srgb,var(--widget-color) 66%,#fff); }
@media(max-width:1100px) { #widgets { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:600px) { #widgets { grid-template-columns:minmax(0,1fr); gap:10px; } .weather-widget { min-height:150px; padding:11px; } .view-toggle { flex-wrap:wrap; } }
