/* Two weather compositions for the offline VEGA HF17 preview. */
html[data-vwx-sky="clear"] { --vwx-photo: url("../assets/weather/clear.webp"); --vwx-accent: #ffd58f; --vwx-tone: #53482a; }
html[data-vwx-sky="cloud"] { --vwx-photo: url("../assets/weather/cloud.webp"); --vwx-accent: #b0ddff; --vwx-tone: #2b4773; }
html[data-vwx-sky="rain"]  { --vwx-photo: url("../assets/weather/rain.webp");  --vwx-accent: #8ee8ff; --vwx-tone: #174964; }
html[data-vwx-sky="snow"]  { --vwx-photo: url("../assets/weather/snow.webp");  --vwx-accent: #cee5ff; --vwx-tone: #424c79; }
html[data-vwx-sky="fog"]   { --vwx-photo: url("../assets/weather/fog.webp");   --vwx-accent: #bde3dc; --vwx-tone: #314f58; }
html[data-vwx-sky="storm"] { --vwx-photo: url("../assets/weather/storm.webp"); --vwx-accent: #e4c1ff; --vwx-tone: #493866; }
html[data-vwx-sky="night"] { --vwx-photo: url("../assets/weather/night.webp"); --vwx-accent: #b8ccff; --vwx-tone: #263864; }

html[data-vega-accent][data-vwx-sky] .vega-hf08-tile.hf09-tile[data-hf08="weather"] {
  background: linear-gradient(110deg, #112641ed, #122b4991 57%, #11243b42),
    linear-gradient(0deg, #102140b3, transparent 68%), var(--vwx-photo) center 76% / cover !important;
}

html[data-vwx-sky] .hf09-tile[data-hf08="weather"] .hf09-ambient { opacity: .38; }
html[data-vwx-sky] .hf09-tile[data-hf08="weather"] .hf09-visual .vwx-icon {
  width: 87%; height: 87%; animation: none;
  filter: drop-shadow(0 4px 6px #0a173a8c);
}
.hf09-copy:has(.vwx-mini-reading) .vega-hf08-value { display: none !important; }
.vwx-mini-reading {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  font: 600 11px/1.2 system-ui, sans-serif;
  color: #eef5ff;
}
.vwx-mini-reading b { font-size: clamp(11px, 1.34vw, 18px); color: var(--vwx-accent); }
.vwx-mini-reading span { overflow: hidden; text-overflow: ellipsis; }
html.vega-hf09-scrolled .vwx-mini-reading b { font-size: 11px; }

html[data-vega-accent] .vega-r10-hub .vega-hub-drawer.vwx-drawer[data-hf11-kind="weather"] {
  --hf17-primary: var(--vwx-accent);
  background: radial-gradient(ellipse at 88% 0%, var(--vwx-tone), transparent 69%), #091324 !important;
}

html[data-vega-accent] .vega-r10-hub .vega-hub-drawer.vwx-drawer[data-hf11-kind="weather"] > .hf11-detail-columns {
  display: block !important;
  padding: clamp(14px, 1.6vw, 23px) !important;
}

html[data-vega-accent] .vega-r10-hub .vega-hub-drawer.vwx-drawer[data-hf11-kind="weather"] .vega-hub-close {
  top: clamp(17px, 1.85vw, 27px) !important;
  right: clamp(14px, 1.6vw, 23px) !important;
  width: 38px !important;
  height: 38px !important;
  transition: background .18s, color .18s !important;
}

html[data-vega-accent] .vega-r10-hub .vega-hub-drawer.vwx-drawer[data-hf11-kind="weather"] .vega-hub-close:hover {
  transform: none;
}

.vwx {
  --vwx-edge: #e5f1ff24;
  --vwx-secondary: #c3d1e7;
  display: grid;
  gap: 13px;
  min-width: 0;
  color: #f8faff;
  color-scheme: dark;
  font: 500 14px/1.35 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

.vwx *, .vwx *::before, .vwx *::after { box-sizing: border-box; }
.vwx :is(h2, h3, p, dl, dd, ol) { margin: 0; }
.vwx-icon { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.vwx-icon-clear, .vwx-sun-ray { color: #ffda92; }
.vwx-wet-ray { color: #9fddff; }

.vwx-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  padding-right: 49px;
}

.vwx-place { display: flex; gap: 10px; align-items: center; }
.vwx-pin {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  color: var(--vwx-accent);
  border: 1px solid var(--vwx-edge);
  border-radius: 11px;
  background: #bbdbff11;
}
.vwx-place h2 {
  color: inherit;
  font-size: clamp(18px, 1.65vw, 24px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.025em;
}
.vwx-place p { margin-top: 3px; color: var(--vwx-secondary); font-size: 12px; }

.vwx-layout-choice {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--vwx-edge);
  border-radius: 13px;
  background: #060d1b78;
}

.vwx button {
  appearance: none;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  padding: 7px 12px;
  min-height: 34px;
  background: transparent;
  color: #deebff;
  font: 630 13px/1.2 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  transition: background-color .18s, border-color .18s, color .18s;
}
.vwx button:hover { background-color: #d2e4ff1e; }
.vwx button:focus-visible { outline: 2px solid var(--vwx-accent); outline-offset: 2px; }
.vwx button[aria-pressed="true"] {
  color: #0e1c31;
  background-color: var(--vwx-accent);
  border-color: #f7fbff79;
  box-shadow: 0 3px 12px #06102345;
}

.vwx-main {
  --vwx-cover: linear-gradient(93deg, #071424ef 0%, #0b1c32a6 27%, #0a17272c 61%, transparent),
    linear-gradient(0deg, #091322dc 0%, #09132246 37%, transparent 77%),
    var(--vwx-photo) center 72% / cover no-repeat;
  min-width: 0;
}

.vwx-current {
  position: relative;
  display: grid;
  align-content: center;
  overflow: hidden;
  min-width: 0;
  min-height: clamp(196px, 18vw, 255px);
  padding: clamp(18px, 3vw, 40px);
  text-shadow: 0 3px 14px #0311268a;
}
.vwx-current-content { position: relative; }
.vwx-now {
  display: block;
  color: #e0ebfa;
  font-size: 14px;
  font-weight: 620;
}
.vwx-temperature {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 25px);
  margin-top: 2px;
  color: #fff;
  font-size: clamp(60px, 7vw, 106px);
  font-weight: 410;
  line-height: 1.01;
  letter-spacing: -.087em;
}
.vwx-temperature .vwx-icon {
  width: clamp(39px, 5vw, 71px);
  height: clamp(39px, 5vw, 71px);
  filter: drop-shadow(0 4px 12px #091728a3);
}
.vwx-reading p { margin-top: 4px; font-size: clamp(17px, 1.66vw, 24px); font-weight: 650; }

.vwx[data-vwx-layout="scene"] .vwx-main {
  overflow: hidden;
  border: 1px solid #e5f1ff36;
  border-radius: 17px;
  background: var(--vwx-cover);
  background-position: center, center, center 93%;
  box-shadow: 0 12px 25px -21px #000b;
}
.vwx[data-vwx-layout="cards"] .vwx-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 10px;
}
.vwx[data-vwx-layout="cards"] .vwx-current {
  background: var(--vwx-cover);
  border: 1px solid #e5f1ff36;
  border-radius: 17px;
}

.vwx-metrics { display: grid; min-width: 0; }
.vwx[data-vwx-layout="scene"] .vwx-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid #e5f1ff36;
  background: #09172970;
  backdrop-filter: blur(12px) saturate(1.15);
}
.vwx[data-vwx-layout="cards"] .vwx-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.vwx-metric { min-width: 0; padding: 12px clamp(12px, 1.85vw, 27px); }
.vwx[data-vwx-layout="scene"] .vwx-metric + .vwx-metric { border-left: 1px solid var(--vwx-edge); }
.vwx[data-vwx-layout="cards"] .vwx-metric {
  display: grid;
  align-content: center;
  gap: 6px;
  padding-block: 16px;
  border: 1px solid var(--vwx-edge);
  border-radius: 15px;
  background: linear-gradient(156deg, #d9ebff28, #92b8ff0b 66%), #11223a91;
  box-shadow: inset 0 1px #f2f7ff10, 0 10px 22px -18px #000b;
}
.vwx-metric dt {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #deebfb;
  font-size: 14px;
  line-height: 1.25;
}
.vwx-metric .vwx-icon { color: var(--vwx-accent); }
.vwx-metric dd {
  margin-top: 4px;
  font-size: clamp(23px, 2.55vw, 38px);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.04;
}
.vwx-metric dd span { color: var(--vwx-secondary); font-size: .47em; font-weight: 600; letter-spacing: 0; }

.vwx-hours {
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--vwx-edge);
  border-radius: 15px;
  background: linear-gradient(140deg, #c5dcff0f, #d5e1ff05);
}
.vwx-hours-head { display: flex; justify-content: space-between; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 9px; }
.vwx-hours-head h3 { font: 660 clamp(15px, 1.34vw, 19px)/1.25 "Segoe UI Variable", "Segoe UI", system-ui, sans-serif; color: inherit; }
.vwx-hours-head span { display: flex; align-items: center; gap: 5px; color: var(--vwx-secondary); font-size: 12px; }
.vwx-hours-head .vwx-icon { width: 13px; height: 13px; color: var(--vwx-accent); }
.vwx-hour-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; padding: 0; list-style: none; }
.vwx-hour {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 9px 2px 8px;
  border: 1px solid #e5efff10;
  border-radius: 10px;
  background: #e5edff07;
}
.vwx-hour:first-child { background: #9ec8ff22; border-color: #bbddff48; }
.vwx-hour .vwx-icon { width: 25px; height: 25px; }
.vwx-hour strong { font-size: 17px; font-weight: 680; }
.vwx-time { font-size: 13px; font-weight: 600; color: var(--vwx-secondary); }
.vwx-probability { color: var(--vwx-accent); font-size: 12px; font-weight: 580; }

.vwx-picker { display: flex; gap: 7px 12px; align-items: center; flex-wrap: wrap; }
.vwx-picker > span { color: var(--vwx-secondary); font-size: 13px; font-weight: 600; }
.vwx-scene-choice { display: flex; flex-wrap: wrap; gap: 5px; }
.vwx-scene-choice button { border-color: var(--vwx-edge); background-color: #c9dcff0d; }
.vwx-scene-choice .vwx-icon { width: 15px; height: 15px; }
.vwx-scene-choice button[aria-pressed="true"] :is(.vwx-icon, .vwx-sun-ray, .vwx-wet-ray) { color: inherit; }

.vwx-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.vwx-particles i {
  position: absolute;
  left: var(--x);
  top: -29px;
  width: 1px;
  height: 22px;
  opacity: .5;
  background: linear-gradient(transparent, #bbddffad);
  animation: vwx-rain calc(1s * var(--speed)) linear calc(-1s * var(--delay)) infinite;
}
html[data-vwx-sky="snow"] .vwx-particles i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  opacity: .65;
  background: #f4f8ff;
  animation: vwx-snow calc(7s * var(--speed)) linear calc(-5s * var(--delay)) infinite;
}
@keyframes vwx-rain { from { transform: translate3d(60px, 0, 0) rotate(14deg); } to { transform: translate3d(-10px, 370px, 0) rotate(14deg); } }
@keyframes vwx-snow { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-24px, 370px, 0); } }

@media (max-width: 640px) {
  .vwx-mini-reading span { display: none; }
  .vwx[data-vwx-layout="cards"] .vwx-main { grid-template-columns: minmax(0, 1fr); }
  .vwx[data-vwx-layout="scene"] .vwx-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vwx[data-vwx-layout="scene"] .vwx-metric:nth-child(3) { border-left: 0; }
  .vwx[data-vwx-layout="scene"] .vwx-metric:nth-child(n+3) { border-top: 1px solid var(--vwx-edge); }
  .vwx-hour-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .vwx { gap: 10px; }
  .vwx-toolbar { padding-right: 42px; }
  .vwx-place { gap: 7px; }
  .vwx-pin { width: 33px; height: 33px; }
  .vwx-place p { font-size: 11px; }
  .vwx-metric dt { font-size: 13px; }
  .vwx-metric .vwx-icon { width: 16px; height: 16px; }
  .vwx-scene-choice button { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .vwx-particles { display: none; }
  .vwx button { transition: none; }
}
