/* Weather widget (styling=true): current conditions card, forecast card and error card. */

:root {
  --wx-bg: #ffffff; --wx-tile: #f4f5f7; --wx-text: #1c1c1a; --wx-muted: #6b6b66; --wx-border: #e6e6e2;
  --wx-track: #e6e6e2; --wx-accent: #1c1c1a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --wx-bg: #26251f; --wx-tile: #302f28; --wx-text: #f2f1ea; --wx-muted: #a8a89f; --wx-border: #3c3b33;
    --wx-track: #3c3b33; --wx-accent: #f2f1ea;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; padding: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--wx-text); background: transparent;
}
.wx-layout { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.wx-card {
  width: 100%; max-width: 360px; background: var(--wx-bg); border: 1px solid var(--wx-border);
  border-radius: 16px; padding: 18px 18px 16px;
}
.wx-loc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--wx-muted); margin-bottom: 14px; }
.wx-loc strong { color: var(--wx-text); font-weight: 600; }
.wx-hero { display: flex; align-items: center; justify-content: space-between; }
.wx-temp { font-size: 52px; font-weight: 600; line-height: 1; }
.wx-temp .wx-unit { font-size: 22px; color: var(--wx-muted); font-weight: 400; }
.wx-cond { display: flex; justify-content: space-between; font-size: 13px; color: var(--wx-muted); margin: 6px 0 16px; }

/* Today's min-max range bar with the "now" dot. */
.wx-range-track { height: 6px; border-radius: 4px; background: var(--wx-track); position: relative; margin-bottom: 6px; }
.wx-range-fill { position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(90deg, #85B7EB, #EF9F27); }
.wx-range-dot {
  position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--wx-bg);
  border: 2px solid var(--wx-accent); transform: translate(-50%, -50%);
}
.wx-range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--wx-muted); margin-bottom: 16px; }

/* Tiles: humidity, wind, rain, UV. */
.wx-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.wx-tile { background: var(--wx-tile); border-radius: 10px; padding: 10px 12px; }
.wx-tile-label { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--wx-muted); }
.wx-tile-value { font-size: 18px; font-weight: 600; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.wx-tile-value .wx-unit { font-size: 12px; color: var(--wx-muted); font-weight: 400; }

/* UV pill per WHO band; text in the darkest shade of the band's own colour. */
.wx-pill { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 20px; }
.wx-pill--low { background: #EAF3DE; color: #3B6D11; }
.wx-pill--moderate { background: #FAEEDA; color: #854F0B; }
.wx-pill--high { background: #FAECE7; color: #993C1D; }
.wx-pill--veryhigh { background: #FCEBEB; color: #A32D2D; }
.wx-pill--extreme { background: #EEEDFE; color: #3C3489; }

.wx-more {
  display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 10px;
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--wx-text); background: var(--wx-tile);
  border: 1px solid var(--wx-border); border-radius: 10px; cursor: pointer; transition: background .15s;
}
.wx-more:hover { background: var(--wx-border); }
.wx-more-disabled { color: var(--wx-muted); cursor: default; }
.wx-updated { text-align: center; font-size: 11px; color: var(--wx-muted); margin-top: 10px; }

/* Forecast card. */
.wx-fc-title { font-size: 13px; font-weight: 600; color: var(--wx-muted); margin-bottom: 10px; }
.wx-fc-row { display: flex; align-items: center; gap: 10px; padding: 10px 0 18px; border-top: 1px solid var(--wx-border); }
.wx-fc-row:first-child { border-top: none; padding-top: 0; }
.wx-fc-day { width: 34px; font-size: 13px; font-weight: 500; }
.wx-fc-icon { position: relative; width: 30px; height: 24px; display: flex; align-items: center; justify-content: center; }
.wx-fc-rain {
  position: absolute; top: 100%; margin-top: 3px; left: 50%; transform: translateX(-50%);
  font-size: 11px; line-height: 11px; color: #378ADD; font-weight: 500; white-space: nowrap;
}
.wx-fc-low { width: 24px; font-size: 13px; color: var(--wx-muted); text-align: right; }
.wx-fc-bar { flex: 1; position: relative; height: 6px; border-radius: 4px; background: var(--wx-track); }
.wx-fc-bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: linear-gradient(90deg, #85B7EB, #EF9F27); }
.wx-fc-high { width: 28px; font-size: 13px; font-weight: 500; text-align: right; }

/* Error card. */
.wx-err {
  max-width: 360px; margin: 0 auto; background: #FCEBEB; border: 1px solid #F09595; color: #791F1F;
  border-radius: 16px; padding: 18px; font-size: 14px; line-height: 1.5;
}
.wx-err strong { display: block; margin-bottom: 6px; font-size: 15px; }

/* Positions along the range and forecast bars, in whole percent (the page may carry no inline
   style attributes): .wx-l-N places the "now" dot or a bar segment's start at N%, .wx-w-N sets a
   bar segment's width to N%. */
.wx-l-0 { left: 0%; }
.wx-l-1 { left: 1%; }
.wx-l-2 { left: 2%; }
.wx-l-3 { left: 3%; }
.wx-l-4 { left: 4%; }
.wx-l-5 { left: 5%; }
.wx-l-6 { left: 6%; }
.wx-l-7 { left: 7%; }
.wx-l-8 { left: 8%; }
.wx-l-9 { left: 9%; }
.wx-l-10 { left: 10%; }
.wx-l-11 { left: 11%; }
.wx-l-12 { left: 12%; }
.wx-l-13 { left: 13%; }
.wx-l-14 { left: 14%; }
.wx-l-15 { left: 15%; }
.wx-l-16 { left: 16%; }
.wx-l-17 { left: 17%; }
.wx-l-18 { left: 18%; }
.wx-l-19 { left: 19%; }
.wx-l-20 { left: 20%; }
.wx-l-21 { left: 21%; }
.wx-l-22 { left: 22%; }
.wx-l-23 { left: 23%; }
.wx-l-24 { left: 24%; }
.wx-l-25 { left: 25%; }
.wx-l-26 { left: 26%; }
.wx-l-27 { left: 27%; }
.wx-l-28 { left: 28%; }
.wx-l-29 { left: 29%; }
.wx-l-30 { left: 30%; }
.wx-l-31 { left: 31%; }
.wx-l-32 { left: 32%; }
.wx-l-33 { left: 33%; }
.wx-l-34 { left: 34%; }
.wx-l-35 { left: 35%; }
.wx-l-36 { left: 36%; }
.wx-l-37 { left: 37%; }
.wx-l-38 { left: 38%; }
.wx-l-39 { left: 39%; }
.wx-l-40 { left: 40%; }
.wx-l-41 { left: 41%; }
.wx-l-42 { left: 42%; }
.wx-l-43 { left: 43%; }
.wx-l-44 { left: 44%; }
.wx-l-45 { left: 45%; }
.wx-l-46 { left: 46%; }
.wx-l-47 { left: 47%; }
.wx-l-48 { left: 48%; }
.wx-l-49 { left: 49%; }
.wx-l-50 { left: 50%; }
.wx-l-51 { left: 51%; }
.wx-l-52 { left: 52%; }
.wx-l-53 { left: 53%; }
.wx-l-54 { left: 54%; }
.wx-l-55 { left: 55%; }
.wx-l-56 { left: 56%; }
.wx-l-57 { left: 57%; }
.wx-l-58 { left: 58%; }
.wx-l-59 { left: 59%; }
.wx-l-60 { left: 60%; }
.wx-l-61 { left: 61%; }
.wx-l-62 { left: 62%; }
.wx-l-63 { left: 63%; }
.wx-l-64 { left: 64%; }
.wx-l-65 { left: 65%; }
.wx-l-66 { left: 66%; }
.wx-l-67 { left: 67%; }
.wx-l-68 { left: 68%; }
.wx-l-69 { left: 69%; }
.wx-l-70 { left: 70%; }
.wx-l-71 { left: 71%; }
.wx-l-72 { left: 72%; }
.wx-l-73 { left: 73%; }
.wx-l-74 { left: 74%; }
.wx-l-75 { left: 75%; }
.wx-l-76 { left: 76%; }
.wx-l-77 { left: 77%; }
.wx-l-78 { left: 78%; }
.wx-l-79 { left: 79%; }
.wx-l-80 { left: 80%; }
.wx-l-81 { left: 81%; }
.wx-l-82 { left: 82%; }
.wx-l-83 { left: 83%; }
.wx-l-84 { left: 84%; }
.wx-l-85 { left: 85%; }
.wx-l-86 { left: 86%; }
.wx-l-87 { left: 87%; }
.wx-l-88 { left: 88%; }
.wx-l-89 { left: 89%; }
.wx-l-90 { left: 90%; }
.wx-l-91 { left: 91%; }
.wx-l-92 { left: 92%; }
.wx-l-93 { left: 93%; }
.wx-l-94 { left: 94%; }
.wx-l-95 { left: 95%; }
.wx-l-96 { left: 96%; }
.wx-l-97 { left: 97%; }
.wx-l-98 { left: 98%; }
.wx-l-99 { left: 99%; }
.wx-l-100 { left: 100%; }
.wx-w-0 { width: 0%; }
.wx-w-1 { width: 1%; }
.wx-w-2 { width: 2%; }
.wx-w-3 { width: 3%; }
.wx-w-4 { width: 4%; }
.wx-w-5 { width: 5%; }
.wx-w-6 { width: 6%; }
.wx-w-7 { width: 7%; }
.wx-w-8 { width: 8%; }
.wx-w-9 { width: 9%; }
.wx-w-10 { width: 10%; }
.wx-w-11 { width: 11%; }
.wx-w-12 { width: 12%; }
.wx-w-13 { width: 13%; }
.wx-w-14 { width: 14%; }
.wx-w-15 { width: 15%; }
.wx-w-16 { width: 16%; }
.wx-w-17 { width: 17%; }
.wx-w-18 { width: 18%; }
.wx-w-19 { width: 19%; }
.wx-w-20 { width: 20%; }
.wx-w-21 { width: 21%; }
.wx-w-22 { width: 22%; }
.wx-w-23 { width: 23%; }
.wx-w-24 { width: 24%; }
.wx-w-25 { width: 25%; }
.wx-w-26 { width: 26%; }
.wx-w-27 { width: 27%; }
.wx-w-28 { width: 28%; }
.wx-w-29 { width: 29%; }
.wx-w-30 { width: 30%; }
.wx-w-31 { width: 31%; }
.wx-w-32 { width: 32%; }
.wx-w-33 { width: 33%; }
.wx-w-34 { width: 34%; }
.wx-w-35 { width: 35%; }
.wx-w-36 { width: 36%; }
.wx-w-37 { width: 37%; }
.wx-w-38 { width: 38%; }
.wx-w-39 { width: 39%; }
.wx-w-40 { width: 40%; }
.wx-w-41 { width: 41%; }
.wx-w-42 { width: 42%; }
.wx-w-43 { width: 43%; }
.wx-w-44 { width: 44%; }
.wx-w-45 { width: 45%; }
.wx-w-46 { width: 46%; }
.wx-w-47 { width: 47%; }
.wx-w-48 { width: 48%; }
.wx-w-49 { width: 49%; }
.wx-w-50 { width: 50%; }
.wx-w-51 { width: 51%; }
.wx-w-52 { width: 52%; }
.wx-w-53 { width: 53%; }
.wx-w-54 { width: 54%; }
.wx-w-55 { width: 55%; }
.wx-w-56 { width: 56%; }
.wx-w-57 { width: 57%; }
.wx-w-58 { width: 58%; }
.wx-w-59 { width: 59%; }
.wx-w-60 { width: 60%; }
.wx-w-61 { width: 61%; }
.wx-w-62 { width: 62%; }
.wx-w-63 { width: 63%; }
.wx-w-64 { width: 64%; }
.wx-w-65 { width: 65%; }
.wx-w-66 { width: 66%; }
.wx-w-67 { width: 67%; }
.wx-w-68 { width: 68%; }
.wx-w-69 { width: 69%; }
.wx-w-70 { width: 70%; }
.wx-w-71 { width: 71%; }
.wx-w-72 { width: 72%; }
.wx-w-73 { width: 73%; }
.wx-w-74 { width: 74%; }
.wx-w-75 { width: 75%; }
.wx-w-76 { width: 76%; }
.wx-w-77 { width: 77%; }
.wx-w-78 { width: 78%; }
.wx-w-79 { width: 79%; }
.wx-w-80 { width: 80%; }
.wx-w-81 { width: 81%; }
.wx-w-82 { width: 82%; }
.wx-w-83 { width: 83%; }
.wx-w-84 { width: 84%; }
.wx-w-85 { width: 85%; }
.wx-w-86 { width: 86%; }
.wx-w-87 { width: 87%; }
.wx-w-88 { width: 88%; }
.wx-w-89 { width: 89%; }
.wx-w-90 { width: 90%; }
.wx-w-91 { width: 91%; }
.wx-w-92 { width: 92%; }
.wx-w-93 { width: 93%; }
.wx-w-94 { width: 94%; }
.wx-w-95 { width: 95%; }
.wx-w-96 { width: 96%; }
.wx-w-97 { width: 97%; }
.wx-w-98 { width: 98%; }
.wx-w-99 { width: 99%; }
.wx-w-100 { width: 100%; }
