/* Vädersidan (vader.html). Bygger på OBS-overlayens weather.css men i webbskala,
   med sajtens tokens från styles.css. */
.wx-root { --text-2: #d4d9e0; --slot-max: 112px; }

.wx-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.wx-accent { color: var(--red); }
.wx-note { color: var(--muted); font-size: 0.95rem; margin: 0.8rem 0 0; }
.wx-empty { color: var(--muted); font-size: 1.1rem; margin: 2rem 0; }

/* ---- huvud ------------------------------------------------------------- */
.wx-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; }
.wx-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0 0 0.2em; }
.wx-sub { margin: 0; color: var(--muted); font-size: 1.05rem; }
.wx-head .wx-tag { margin-top: 0.9rem; }

.wx-count { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.wx-count strong { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; }
.wx-count span { color: var(--muted); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.8rem; }
.wx-count.is-live strong { color: var(--red); }

.wx-tag {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 45, 45, 0.4);
  background: rgba(255, 45, 45, 0.12);
  font-family: var(--font-display); font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.16em; text-transform: uppercase; white-space: nowrap;
}
.wx-tag .wx-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.wx-tag.is-ok { border-color: var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--muted); }
.wx-tag.is-ok .wx-dot { background: var(--cyan); }

/* ---- zoomreglage --------------------------------------------------------- */
.wx-zoom {
  display: flex; gap: 4px;
  margin: 2rem 0 1.6rem;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  width: fit-content; max-width: 100%;
}
.wx-zoom a {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 96px; padding: 0.45rem 1.1rem;
  border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); line-height: 1.15;
  text-decoration: none !important;
  transition: background .2s ease;
}
.wx-zoom a:hover { background: rgba(255, 255, 255, 0.07); }
.wx-zoom a.is-active { background: linear-gradient(135deg, var(--red-2), var(--red)); color: #fff; }
.wx-zoom a.is-locked { color: var(--faint); }
.wx-zoom a.is-active.is-locked { color: rgba(255, 255, 255, 0.8); }
.wx-zoom a small { font-size: 0.68rem; letter-spacing: 0.06em; text-transform: none; font-weight: 500; }

.wx-zoomin {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.2rem;
  font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.wx-locked {
  padding: 2rem 1.6rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
}
.wx-locked p { margin: 0; font-size: 1.05rem; }

/* ---- översikt ------------------------------------------------------------ */
.wx-evening {
  display: flex; gap: 1.4rem; align-items: center;
  padding: 1.4rem 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
}
.wx-evening-main { min-width: 0; }
.wx-evening-main > strong { display: block; font-family: var(--font-display); font-size: 1.8rem; line-height: 1.1; margin: 0.15rem 0 0.5rem; }
.wx-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; list-style: none; margin: 0; padding: 0; color: var(--muted); font-size: 0.9rem; }
.wx-facts b { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--text); }
.wx-facts li { min-width: 6rem; }

.wx-block { margin-top: 2rem; }
.wx-level > .wx-block:first-child { margin-top: 0; }
.wx-block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.7rem; }
.wx-block-head small { color: var(--faint); font-size: 0.8rem; }

.wx-days {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(92px, 1fr);
  gap: 6px;
  overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 10px 0 6px; /* plats för racebrickan ovanför kortet */
}
.wx-day {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 0.8rem 0.4rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  scroll-snap-align: start;
  text-align: center;
}
.wx-day.is-today { border-color: var(--line-2); }
.wx-day.is-race { border-color: rgba(255, 45, 45, 0.55); box-shadow: inset 0 3px 0 var(--red); }
.wx-day.is-beyond p { margin: 0.6rem 0; color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.wx-day-name { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; }
.wx-day.is-race .wx-day-name { color: var(--red); }
.wx-day-date { color: var(--faint); font-size: 0.78rem; }
.wx-day .wx-icon { width: 40px; height: 40px; }
.wx-day-temp { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.wx-day-temp small { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.wx-day-rain { width: 70%; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.wx-day-rain i { display: block; height: 100%; background: var(--cyan); }
.wx-day-pct { color: var(--muted); font-size: 0.75rem; white-space: nowrap; }
.wx-day-badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 1px 7px; border-radius: 5px;
}

.wx-now {
  display: flex; gap: 0.9rem; align-items: center;
  margin-top: 1.6rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.wx-now .wx-icon { width: 44px; height: 44px; flex: none; }
.wx-now p { margin: 0.1rem 0 0; color: var(--text-2); }
.wx-now strong { font-family: var(--font-display); font-size: 1.4rem; color: var(--text); }

/* ---- kvällen / detalj (overlayens delar i webbskala) --------------------- */
.wx-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: 0 0 1.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.wx-stat { display: flex; flex-direction: column; gap: 2px; padding: 1rem 1.2rem; }
.wx-stat + .wx-stat { border-left: 1px solid var(--line); }
.wx-stat strong { font-family: var(--font-display); font-weight: 700; font-size: 2.1rem; line-height: 1.05; }
.wx-stat strong small { font-size: 0.5em; color: var(--muted); font-weight: 600; }
.wx-stat .wx-arrow { color: var(--faint); margin: 0 4px; font-weight: 500; }
.wx-stat-label { font-family: var(--font-display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.wx-stat-detail { color: var(--muted); font-size: 0.85rem; }

.wx-timeline-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 6px; }
.wx-timeline {
  display: grid; gap: 6px; justify-content: center;
  grid-template-columns: repeat(var(--slots), minmax(64px, var(--slot-max)));
}
.wx-slot {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 0.8rem 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}
.wx-slot.is-rain { background: linear-gradient(180deg, rgba(26, 214, 230, 0.12), var(--surface) 70%); box-shadow: inset 0 3px 0 var(--cyan); }
.wx-slot.is-now { border-color: rgba(255, 45, 45, 0.55); box-shadow: inset 0 3px 0 var(--red); }
.wx-slot.is-past { opacity: 0.4; }
.wx-time { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--muted); letter-spacing: 0.04em; }
.wx-slot.is-now .wx-time { color: var(--red); font-weight: 700; letter-spacing: 0.18em; }
.wx-slot .wx-icon { width: 40px; height: 40px; }
.wx-temp { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.wx-bar { position: relative; width: 14px; height: 70px; margin-top: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.wx-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, var(--cyan), rgba(26, 214, 230, 0.45)); }
.wx-pct { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text-2); }
.wx-mm { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; color: var(--cyan); min-height: 1.1em; white-space: nowrap; }
.wx-extra { color: var(--faint); font-size: 0.72rem; line-height: 1.35; text-align: center; border-top: 1px solid var(--line); padding-top: 4px; width: 80%; }

.wx-history {
  display: grid; grid-template-columns: 1fr 1.25fr; gap: 2rem; align-items: center;
  margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.wx-history-text p { margin: 0.4rem 0 0; color: var(--text-2); line-height: 1.5; }
.wx-strip { display: block; width: 100%; height: 56px; }
.wx-strip-bar { fill: var(--cyan); }
.wx-strip-base { stroke: var(--line-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.wx-strip-labels { display: flex; justify-content: space-between; font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; color: var(--faint); letter-spacing: 0.08em; }

.wx-foot { margin-top: 2.4rem; color: var(--faint); font-size: 0.8rem; }
.wx-foot a { color: var(--muted); }

/* ---- ikoner ---------------------------------------------------------------- */
.wx-icon { width: 48px; height: 48px; }
.wx-icon--xl { width: 84px; height: 84px; flex: none; }
.wx-icon * { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.wx-i-sun circle { fill: var(--gold); stroke: var(--gold); }
.wx-i-sun line { stroke: var(--gold); }
.wx-i-cloud { fill: var(--surface-2); stroke: var(--silver); }
.wx-slot.is-rain .wx-i-cloud { fill: #1a2630; }
.wx-i-cloud-line line { stroke: var(--silver); }
.wx-i-rain line { stroke: var(--cyan); }
.wx-i-rain-dot circle, .wx-i-snow circle { fill: var(--cyan); stroke: none; }
.wx-i-snow circle { fill: var(--silver); }
.wx-i-bolt { fill: var(--gold); stroke: var(--gold); stroke-width: 1.5; }
.wx-i-unknown { fill: var(--muted); stroke: none; font-family: var(--font-display); font-size: 28px; font-weight: 700; }

/* ---- mobil ----------------------------------------------------------------- */
@media (max-width: 700px) {
  .wx-stats { grid-template-columns: 1fr 1fr; }
  .wx-stat:nth-child(3) { border-left: 0; }
  .wx-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .wx-stat { padding: 0.8rem 0.9rem; }
  .wx-stat strong { font-size: 1.7rem; }
  .wx-timeline { justify-content: start; }
  .wx-history { grid-template-columns: 1fr; gap: 1rem; }
  .wx-evening { align-items: flex-start; padding: 1.1rem; gap: 1rem; }
  .wx-icon--xl { width: 60px; height: 60px; }
  .wx-head { align-items: flex-start; }
  .wx-count { align-items: flex-start; text-align: left; }
}
@media (max-width: 420px) {
  .wx-zoom { width: 100%; }
  .wx-zoom a { flex: 1; min-width: 0; padding: 0.45rem 0.4rem; font-size: 0.85rem; }
}
