/* ================================================================
   BhumiAI — weather page (static/css/weather.css)
   Layout for /weather only, on top of tokens.css + bhumi-ui.css.
   Top to bottom (D-W1): header · warning · hero · next rain · 24 h ·
   daily · details · GKMS advisory · source footer · bottom nav.
   ================================================================ */
.wx-page{display:flex;flex-direction:column;gap:var(--bh-space-2);max-width:760px;margin:0 auto;padding:72px var(--bh-space-4) calc(56px + var(--bh-space-8) + env(safe-area-inset-bottom));background:transparent}
.wx-page p{margin:0}
body{background:var(--bh-bg)}
body>footer{padding-bottom:72px}
.wx-page [hidden],.bh-sheet [hidden]{display:none!important}
/* the translator's floating globe sits above this page's bottom nav, not on top of it */
body #bhumai-lang-switcher{bottom:calc(72px + env(safe-area-inset-bottom))}

/* ── HEADER ─────────────────────────────────────────────────────── */
.wx-head{display:flex;align-items:center;justify-content:space-between;gap:var(--bh-space-2)}
.wx-head .bh-loc{min-width:0;max-width:calc(100% - 152px)}
/* place · district may take two lines rather than lose the district to an ellipsis */
.wx-head__place{min-width:0;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-height:1.2;text-align:left;overflow-wrap:anywhere}
.wx-head .bh-switch{flex:none}
.wx-head .bh-switch__opt{min-width:64px;padding:0 var(--bh-space-3)}

/* ── WARNING BAND (IMD colours; IMD's English, verbatim) ────────── */
.wx-warn{padding:var(--bh-space-3)}
.wx-warn .bh-warn__head{margin-bottom:var(--bh-space-1)}
.wx-warn .bh-warn__level{font-size:var(--bh-text-body)}
.wx-warn__body{display:flex;flex-direction:column;gap:var(--bh-space-1)}
.wx-warn .w-warn-top{background:rgba(255,255,255,.45);border-radius:6px;padding:var(--bh-space-2) var(--bh-space-3)}
.wx-warn .w-warn-day{font-size:var(--bh-text-small);line-height:1.45}
.wx-warn .w-warn-top .w-warn-day{font-size:var(--bh-text-small)}
.wx-warn .bh-warn__time{font-size:12px}
.wx-warn .w-warn-day b{font-weight:var(--bh-weight-bold)}
.wx-warn .gloss{font-weight:var(--bh-weight-regular)}
.wx-warn .w-warn-src{font-size:12px;margin-top:2px}
.wx-warn .w-warn-now{background:rgba(255,255,255,.45);border-radius:6px;padding:var(--bh-space-2) var(--bh-space-3);font-size:var(--bh-text-small)}
.wx-warn__days>summary{display:flex;align-items:center;min-height:var(--bh-size-tap);font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold);text-decoration:underline;cursor:pointer}
.wx-warn__days[open]>summary{margin-bottom:var(--bh-space-1)}
.wx-warn__days .w-warn-day{padding:var(--bh-space-2) 0;border-top:1px solid rgba(0,0,0,.15)}
.wx-warn__note{font-size:var(--bh-text-small);color:var(--bh-text-muted)}

/* ── HERO + NEXT RAIN ───────────────────────────────────────────── */
.wx-hero{display:flex;flex-direction:column;gap:var(--bh-space-2);padding:var(--bh-space-3) var(--bh-space-4);border-bottom-left-radius:0;border-bottom-right-radius:0}
.wx-hero__main{display:flex;align-items:center;gap:var(--bh-space-3)}
.wx-hero__icon{width:44px;height:44px;color:var(--bh-primary)}
.wx-hero__side{display:flex;flex-direction:column;gap:2px;min-width:0}
.wx-hero__label{font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold);color:var(--bh-text-muted)}
.wx-hero__cond{font-size:var(--bh-text-title);font-weight:var(--bh-weight-semibold);line-height:1.3}
.wx-hero__meta,.wx-hero__range{color:var(--bh-text-muted)}
.wx-hero__range{font-weight:var(--bh-weight-semibold);color:var(--bh-text)}
.wx-rain{display:flex;flex-direction:column;gap:var(--bh-space-1);margin-top:calc(-1 * var(--bh-space-2) - 1px);padding:var(--bh-space-3) var(--bh-space-4);border-top-left-radius:0;border-top-right-radius:0;border-left:4px solid var(--bh-accent)}
.wx-rain__src{font-size:var(--bh-text-small);font-weight:var(--bh-weight-regular);color:var(--bh-text-muted);white-space:nowrap}
.wx-rain__line{display:flex;align-items:flex-start;gap:var(--bh-space-2);font-size:var(--bh-text-body);font-weight:var(--bh-weight-semibold);line-height:1.4}
.wx-rain__line .bh-icon{margin-top:-1px}

/* the D-W3 line: what the source does not publish, then one tap to the other */
.wx-missing{display:flex;align-items:center;gap:var(--bh-space-3)}
.wx-missing p{flex:1 1 0;min-width:0;color:var(--bh-text-muted)}
.wx-missing .bh-btn{flex:0 1 auto;max-width:55%;line-height:1.25;text-align:center;padding-top:var(--bh-space-1);padding-bottom:var(--bh-space-1);border-radius:var(--bh-radius-card)}
.bh-state .bh-btn{height:auto;line-height:1.3;padding-top:var(--bh-space-1);padding-bottom:var(--bh-space-1)}
.wx-missing p{font-size:var(--bh-text-small)}
.wx-missing .bh-btn{padding:0 var(--bh-space-4)}
.wx-hero .wx-missing{padding-top:var(--bh-space-2);border-top:1px solid var(--bh-border)}
.wx-hero .bh-answer__figure{font-size:52px}

/* ── SECTIONS ───────────────────────────────────────────────────── */
.wx-sec{display:flex;flex-direction:column;gap:var(--bh-space-2);min-width:0;margin-top:var(--bh-space-3)}
.wx-sec__head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:0 var(--bh-space-2)}
.wx-sec__title{margin:0;font-size:var(--bh-text-title);font-weight:var(--bh-weight-bold);line-height:1.3}
.wx-note{font-size:var(--bh-text-small);color:var(--bh-text-muted)}
.wx-sec .bh-hourly{min-width:0}
.wx-sec .bh-day__rain{overflow-wrap:anywhere}

/* ── DETAILS GRID ───────────────────────────────────────────────── */
.wx-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--bh-space-2)}
.wx-cell{display:flex;flex-direction:column;gap:var(--bh-space-1);min-width:0;padding:var(--bh-space-3)}
.wx-cell--wide{grid-column:1/-1}
.wx-cell__title{margin:0;font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold);color:var(--bh-text-muted)}
.wx-cell__value{font-size:var(--bh-text-title);font-weight:var(--bh-weight-bold);line-height:1.3;overflow-wrap:anywhere}
.wx-cell__value .bh-icon{color:var(--bh-text-muted)}
.wx-cell__note{font-size:var(--bh-text-small);color:var(--bh-text-muted)}
.wx-cell .bh-source{margin-top:auto}

/* ── GKMS ADVISORY ──────────────────────────────────────────────── */
.wx-adv{gap:var(--bh-space-3)}
.wx-adv__head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--bh-space-2)}
.wx-badge{display:inline-block;padding:2px var(--bh-space-2);border-radius:var(--bh-radius-pill);background:var(--bh-accent-tint);color:var(--bh-accent-strong);font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold)}
.wx-adv__where{font-size:var(--bh-text-small);color:var(--bh-text-muted)}
.wx-adv__sms{font-weight:var(--bh-weight-semibold);overflow-wrap:anywhere}
.wx-adv__crops{display:flex;flex-direction:column;gap:var(--bh-space-2)}
.wx-adv__crop{border:1px solid var(--bh-border);border-radius:var(--bh-radius-card);background:var(--bh-surface)}
.wx-adv__crop[open]{background:var(--bh-bg)}
.wx-adv__crop>summary{display:flex;align-items:center;gap:var(--bh-space-2);min-height:var(--bh-size-tap);padding:var(--bh-space-2) var(--bh-space-3);list-style:none;cursor:pointer}
.wx-adv__crop>summary::-webkit-details-marker{display:none}
.wx-adv__icon{display:flex;flex:none;width:24px;height:24px}
.wx-adv__icon img,.wx-adv__icon svg,.wx-adv__icon .crop-icon{width:24px;height:24px}
.wx-adv__name{font-weight:var(--bh-weight-semibold);min-width:0;overflow-wrap:anywhere}
.wx-adv__meta{padding:0 var(--bh-space-2);border-radius:var(--bh-radius-pill);background:var(--bh-surface-sunken);font-size:var(--bh-text-small);white-space:nowrap}
.wx-adv__caret{margin-left:auto;color:var(--bh-text-muted);transition:transform .15s}
.wx-adv__crop[open] .wx-adv__caret{transform:rotate(180deg)}
.wx-adv__body{padding:0 var(--bh-space-3) var(--bh-space-3)}
.wx-adv__stage{margin:var(--bh-space-2) 0 var(--bh-space-1)!important;font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold);color:var(--bh-text-muted)}
.wx-adv__list{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:var(--bh-space-1);overflow-wrap:anywhere}
.wx-adv__link{display:inline-flex;align-items:center;min-height:var(--bh-size-tap);color:var(--bh-primary);font-weight:var(--bh-weight-semibold)}
.wx-adv__foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 var(--bh-space-3)}
.wx-adv__copy{font-size:var(--bh-text-small);color:var(--bh-text-muted)}

/* ── SOURCE FOOTER ──────────────────────────────────────────────── */
.wx-foot{display:flex;flex-direction:column;align-items:flex-start;gap:var(--bh-space-2);margin-top:var(--bh-space-4);padding-top:var(--bh-space-3);border-top:1px solid var(--bh-border)}
.wx-foot__credit{font-size:var(--bh-text-small);color:var(--bh-text-muted)}

/* ── LOCATION SHEET ─────────────────────────────────────────────── */
.wx-sheet__group{display:flex;flex-direction:column;gap:var(--bh-space-2);margin:0 0 var(--bh-space-4)}
.wx-sheet__label{margin:0;font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold)}
.wx-sheet__row{display:flex;gap:var(--bh-space-2)}
.wx-sheet__row .wx-input{flex:1;min-width:0}
.wx-sheet__msg{margin:0;min-height:1em;font-size:var(--bh-text-small);color:var(--bh-error-text)}
.wx-input{min-height:var(--bh-size-tap);padding:0 var(--bh-space-3);border:1px solid var(--bh-text-muted);border-radius:var(--bh-radius-card);background:var(--bh-surface);color:var(--bh-text);font:inherit}
.wx-results{margin:0;padding:0;list-style:none}
.wx-results__item{display:flex;flex-direction:column;align-items:flex-start;width:100%;min-height:var(--bh-size-tap);padding:var(--bh-space-2) var(--bh-space-3);border:0;border-bottom:1px solid var(--bh-border);background:transparent;color:var(--bh-text);font:inherit;text-align:left;cursor:pointer}
.wx-results__item small{color:var(--bh-text-muted)}
.wx-results__msg{padding:var(--bh-space-2) 0;font-size:var(--bh-text-small);color:var(--bh-text-muted)}
.wx-saved__list{display:flex;flex-wrap:wrap;gap:var(--bh-space-2);margin:0;padding:0;list-style:none}
.wx-saved__item{display:flex;align-items:center}
.wx-saved__remove{display:inline-flex;align-items:center;justify-content:center;width:var(--bh-size-tap);height:var(--bh-size-tap);border:0;background:transparent;color:var(--bh-text-muted);cursor:pointer}

/* the district question: a PIN on a district border, or a district IMD did not recognise */
.wx-ask{padding:var(--bh-space-3);border:1px solid var(--bh-border);border-left:4px solid var(--bh-accent);border-radius:var(--bh-radius-card);background:var(--bh-surface)}
.wx-ask__q{margin:0;font-weight:var(--bh-weight-semibold);line-height:1.4;overflow-wrap:anywhere}
.wx-ask__opts{display:flex;flex-wrap:wrap;gap:var(--bh-space-2)}
.wx-ask__opts .bh-btn{height:auto;min-height:var(--bh-size-tap);max-width:100%;line-height:1.3;padding-top:var(--bh-space-1);padding-bottom:var(--bh-space-1);overflow-wrap:anywhere}

/* the current place's district, with "Change district" (the town/district search) */
.wx-distnow{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--bh-space-2)}
.wx-distnow__name{margin:0;font-weight:var(--bh-weight-semibold);min-width:0;overflow-wrap:anywhere}
.wx-distnow .bh-btn{height:auto;min-height:var(--bh-size-tap);line-height:1.3;padding-top:var(--bh-space-1);padding-bottom:var(--bh-space-1)}
.wx-distnow__msg{margin:0;font-size:var(--bh-text-small);font-weight:var(--bh-weight-semibold);color:var(--bh-text)}
.wx-distnow__msg:empty{display:none}

/* ── BOTTOM NAV ─────────────────────────────────────────────────── */
/* shared.css styles every bare <nav> as the fixed top bar; undo that for this one */
.wx-bottomnav{top:auto;min-height:56px;z-index:250;background:var(--bh-surface);-webkit-backdrop-filter:none;backdrop-filter:none;border-bottom:0;box-shadow:0 -2px 12px rgba(59,41,26,.06)}
@media (min-width:1024px){.wx-page{padding-top:96px}}
