/* Halaman cuaca (gaya dasbor MSN). Memakai token tema dari style.css. */
.wxpage { padding-top: 20px; padding-bottom: 40px; }
.wx-ic--xl { width: 96px; height: 96px; }
.wx-ssr h1 { font: 800 28px/1.2 var(--font-d); margin: 0 0 8px; }
.wx-ssr .lead { color: var(--text-2); max-width: 70ch; }
.wx-ssr__t { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.wx-ssr__t th, .wx-ssr__t td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.wx-ssr__t caption { text-align: left; font-weight: 600; padding-bottom: 6px; }
#wx-app[aria-busy='true'] { opacity: .6; transition: opacity .2s; }

.wxp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.wxp-title { font: 800 30px/1.15 var(--font-d); letter-spacing: -.02em; margin: 0; }
.wxp-search { position: relative; width: min(420px, 100%); }
.wxp-search form { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 6px 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); }
.wxp-search form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.wxp-search__ic { display: grid; place-items: center; color: var(--muted); }
.wxp-search .ic { width: 18px; height: 18px; }
.wxp-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 15px; outline: 0; height: 100%; }
.wxp-gps { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; color: var(--accent); cursor: pointer; display: grid; place-items: center; }
.wxp-gps:hover { background: var(--accent-soft); }
.wxp-sug { position: absolute; z-index: 30; top: 50px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); }
.wxp-sug button { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--text); font: inherit; cursor: pointer; }
.wxp-sug button:hover, .wxp-sug button:focus-visible { background: var(--surface-2); }
.wxp-sug small, .wxp-sug__empty { color: var(--muted); font-size: 13px; }
.wxp-sug__empty { padding: 10px; }

.wxp-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.wxp-tabs a { padding: 10px 14px; font-weight: 600; font-size: 14.5px; color: var(--text-2); white-space: nowrap; border-bottom: 3px solid transparent; }
.wxp-tabs a:first-child { color: var(--text); border-bottom-color: var(--accent); }
.wxp-tabs a:hover { color: var(--text); }

.wxp-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.wxp-col { display: grid; gap: 16px; min-width: 0; }

.wxp-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px 18px; box-shadow: var(--shadow); min-width: 0; color: var(--text); }
.wxp-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.wxp-card__head h2 { margin: 0; font: 800 18px/1.2 var(--font-d); }

/* kartu utama: gradien langit + teks putih di kedua tema */
.wxp-now { --a: #1f66c9; --b: #123a86; color: #fff; border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); display: grid; gap: 16px;
  background: radial-gradient(120% 90% at 85% -10%, rgba(255, 255, 255, .25), transparent 55%), linear-gradient(165deg, var(--a), var(--b)); }
.wxp-now[data-wx-kind^='cloudy'], .wxp-now[data-wx-kind^='fog'] { --a: #5a6c8c; --b: #34415a; }
.wxp-now[data-wx-kind^='rain'], .wxp-now[data-wx-kind^='drizzle'], .wxp-now[data-wx-kind^='heavy'] { --a: #3d5877; --b: #223249; }
.wxp-now[data-wx-kind^='thunder'] { --a: #3d3f6d; --b: #1f2140; }
.wxp-now[data-wx-kind$='-night'] { --a: #1d2f63; --b: #0c142d; }
.wxp-now__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wxp-now__place { margin: 0; font: 800 22px/1.2 var(--font-d); }
.wxp-now__admin, .wxp-now__upd { margin: 2px 0 0; font-size: 13px; color: rgba(255, 255, 255, .85); }
.wxp-now__main { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.wxp-now__t { display: flex; align-items: flex-start; }
.wxp-now__n { font: 800 88px/1 var(--font-d); letter-spacing: -.05em; }
.wxp-now__u { font-size: 28px; font-weight: 600; margin-top: 8px; }
.wxp-now__c { display: grid; gap: 4px; font-size: 15px; }
.wxp-now__c strong { font-size: 20px; }
.wxp-now__stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.wxp-now__stats div { background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 12px; }
.wxp-now__stats dt { font-size: 12px; color: rgba(255, 255, 255, .85); }
.wxp-now__stats dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; }
.wxp-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wxp-alert { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .92); color: #1a2133; font-size: 13.5px; }
.wxp-alert--warn, .wxp-alert--2 { background: #fff3d6; color: #5b3700; }
.wxp-alert--danger, .wxp-alert--3 { background: #ffe1de; color: #7a1410; }

.wxp-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.wxp-seg button { border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; cursor: pointer; }
.wxp-seg button[aria-pressed='true'] { background: var(--accent); color: var(--accent-ink); }

.wxp-scroll { overflow-x: auto; padding-bottom: 6px; color: var(--accent); }
.wxp-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wxp-chart { display: block; }
.wxp-line { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.wxp-dot { fill: var(--surface); stroke: currentColor; stroke-width: 2; }
.wxp-bar { fill: currentColor; opacity: .22; }
.wxp-hours { display: flex; list-style: none; margin: 0; padding: 0; color: var(--text); }
.wxp-hours li { flex: 0 0 76px; display: grid; justify-items: center; gap: 4px; font-size: 13px; }
.wxp-hours__t { color: var(--muted); font-weight: 600; }
.wxp-hours__v { font-weight: 800; font-size: 16px; }
.wxp-hours__p { color: var(--cua); font-weight: 600; font-size: 12.5px; }

.wxp-days { list-style: none; margin: 0; padding: 0; }
.wxp-days li { display: grid; grid-template-columns: 78px 36px minmax(0, 1fr) 46px 150px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.wxp-days li:first-child { border-top: 0; }
.wxp-days__d { display: grid; }
.wxp-days__d small { color: var(--muted); font-size: 12px; }
.wxp-days__c { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wxp-days__p { color: var(--cua); font-weight: 600; text-align: right; }
.wxp-days__r { display: grid; grid-template-columns: 34px 1fr 34px; gap: 8px; align-items: center; }
.wxp-days__r b:first-child { text-align: right; color: var(--text-2); font-weight: 600; }
.wxp-range { position: relative; height: 6px; border-radius: 3px; background: var(--bg-2); }
.wxp-range u { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: linear-gradient(90deg, #4aa3ff, #ff9d3d); }

.wxp-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.wxp-tile { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 96px; }
.wxp-tile h3 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.wxp-tile__v { margin: 4px 0 2px; font: 800 24px/1.1 var(--font-d); }
.wxp-tile__s { margin: 0; font-size: 12.5px; color: var(--text-2); }
.wxp-compass { position: absolute; right: 12px; top: 12px; width: 26px; height: 26px; color: var(--accent); }

.wxp-aqi { display: flex; align-items: center; gap: 14px; }
.wxp-aqi__n { margin: 0; min-width: 64px; height: 64px; display: grid; place-items: center; border-radius: 16px; font: 800 28px var(--font-d); color: #101828; background: #7ed957; }
.wxp-aqi__n--y { background: #ffe14d; } .wxp-aqi__n--o { background: #ffa24d; } .wxp-aqi__n--r { background: #ff6b5e; } .wxp-aqi__n--p { background: #b583ff; }
.wxp-aqibar { position: relative; height: 8px; margin: 14px 0; border-radius: 4px; background: linear-gradient(90deg, #7ed957, #ffe14d 25%, #ffa24d 40%, #ff6b5e 55%, #b583ff 80%, #7a1f4b); }
.wxp-aqibar i { position: absolute; top: -4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--surface); border: 3px solid var(--text); }
.wxp-poll, .wxp-astro { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.wxp-poll div, .wxp-astro div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.wxp-poll dt, .wxp-astro dt { font-size: 12px; color: var(--muted); }
.wxp-poll dd, .wxp-astro dd { margin: 2px 0 0; font-weight: 600; }
.wxp-moon { display: flex; align-items: center; gap: 12px; margin: 12px 0 0; font-size: 13.5px; color: var(--text-2); }
.wxp-moon__d { width: 44px; height: 44px; flex: none; }

.slippy { position: relative; overflow: hidden; background: var(--bg-2); touch-action: none; cursor: grab; user-select: none; }
.slippy.is-drag { cursor: grabbing; }
.slippy__pane { position: absolute; inset: 0; }
.slippy__t { position: absolute; left: 0; top: 0; width: 256px; height: 256px; max-width: none; will-change: transform; }
.slippy__pin { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--accent); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); z-index: 3; }
.slippy__ctl { position: absolute; right: 10px; top: 10px; z-index: 4; display: grid; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.slippy__ctl button { width: 34px; height: 34px; border: 0; background: var(--surface); color: var(--text); font-size: 20px; cursor: pointer; }
.slippy__ctl button + button { border-top: 1px solid var(--line); }
.wxp-map__el { height: 320px; border-radius: 12px; border: 1px solid var(--line); }
.wxp-map__bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.wxp-map__bar input { flex: 1; min-width: 0; accent-color: var(--accent); }
.wxp-map__time { font-size: 13px; font-weight: 600; color: var(--text-2); min-width: 90px; text-align: right; }
.wxp-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); cursor: pointer; font-size: 12px; }

.wxp-near { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wxp-near a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text); font-size: 14px; }
.wxp-near a:hover { border-color: var(--accent); }
.wxp-near span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wxp-skel { color: var(--muted); font-size: 14px; }

.wxp-cal__t { margin: 0 0 8px; font-weight: 600; color: var(--text-2); }
.wxp-cal__g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wxp-cal__h { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
.wxp-cal__c { display: grid; justify-items: center; gap: 2px; padding: 6px 2px; min-height: 84px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; }
.wxp-cal__c small { justify-self: start; margin-left: 6px; color: var(--muted); }
.wxp-cal__c i { font-style: normal; color: var(--muted); }
.wxp-cal__c.is-today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.wxp-cal__c.is-na { opacity: .5; }

@media (max-width: 980px) { .wxp-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .wxp-title { font-size: 24px; }
  .wxp-now__n { font-size: 68px; }
  .wxp-now__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wxp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wxp-days li { grid-template-columns: 64px 32px minmax(0, 1fr) 118px; }
  .wxp-days__p { display: none; }
  .wxp-days__r { grid-template-columns: 28px 1fr 28px; }
  .wxp-map__el { height: 260px; }
  .wxp-cal__c { min-height: 68px; font-size: 11.5px; }
}
