/* Weather page — rustic cabin styling. Owned by the weather feature. */

.wx-wrap { display: flex; flex-direction: column; gap: 22px; }

/* ---------- hero ---------- */
.wx-hero {
    position: relative; overflow: hidden; border-radius: 18px;
    padding: 26px 24px; color: #fff; min-height: 210px;
    box-shadow: 0 6px 22px rgba(60, 44, 26, .28);
    background: linear-gradient(160deg, #4a6fa5, #7ba3c9);
    transition: background 1.2s ease;
}
.wx-hero.sky-day-clear    { background: linear-gradient(160deg, #3d7ec0 0%, #7fb4dd 55%, #cfe4f2 100%); }
.wx-hero.sky-day-partly   { background: linear-gradient(160deg, #5687b5 0%, #8fb0c6 55%, #d8e2e6 100%); }
.wx-hero.sky-day-overcast { background: linear-gradient(160deg, #6e7a83 0%, #939ea6 55%, #c3cace 100%); }
.wx-hero.sky-day-rain     { background: linear-gradient(160deg, #4a5a68 0%, #6d7f8c 55%, #9aa8b2 100%); }
.wx-hero.sky-day-snow     { background: linear-gradient(160deg, #7d8b98 0%, #a8b6c1 55%, #dde5eb 100%); }
.wx-hero.sky-day-thunder  { background: linear-gradient(160deg, #33404d 0%, #4f5f6e 55%, #77848f 100%); }
.wx-hero.sky-day-fog      { background: linear-gradient(160deg, #8a9198 0%, #adb3b8 55%, #d3d7da 100%); }
.wx-hero.sky-night        { background: linear-gradient(160deg, #12203a 0%, #24375c 55%, #405a7d 100%); }
.wx-hero.sky-night-clear  { background: linear-gradient(160deg, #0b1730 0%, #1b2b4d 55%, #35507a 100%); }
.wx-hero.sky-sunset       { background: linear-gradient(160deg, #37456b 0%, #a2607a 45%, #e39a63 100%); }

/* drifting clouds + falling precip live in here */
.wx-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.wx-cloud {
    position: absolute; background: rgba(255, 255, 255, .55); border-radius: 50%;
    filter: blur(14px); animation: wx-drift linear infinite;
}
@keyframes wx-drift {
    from { transform: translateX(-30%); }
    to   { transform: translateX(130%); }
}
.wx-drop {
    position: absolute; top: -12%; width: 2px; height: 16px;
    background: linear-gradient(transparent, rgba(255, 255, 255, .75));
    animation: wx-fall linear infinite;
}
.wx-flake {
    position: absolute; top: -8%; color: rgba(255, 255, 255, .85);
    font-size: 11px; animation: wx-fall linear infinite;
}
@keyframes wx-fall {
    from { transform: translateY(-20px); opacity: 0; }
    10%  { opacity: 1; }
    to   { transform: translateY(260px); opacity: .15; }
}
.wx-star {
    position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%;
    animation: wx-twinkle ease-in-out infinite;
}
@keyframes wx-twinkle { 0%, 100% { opacity: .18; } 50% { opacity: .95; } }
.wx-sun-orb {
    position: absolute; top: 16px; right: 26px; width: 66px; height: 66px; border-radius: 50%;
    background: radial-gradient(circle, #fff6d0 30%, #ffd76a 62%, rgba(255, 205, 80, 0) 72%);
    animation: wx-pulse 5s ease-in-out infinite;
}
@keyframes wx-pulse { 0%, 100% { transform: scale(1); opacity: .92; } 50% { transform: scale(1.07); opacity: 1; } }
.wx-bolt { position: absolute; inset: 0; background: rgba(255,255,255,.75); opacity: 0; animation: wx-flash 7s linear infinite; }
@keyframes wx-flash { 0%, 92%, 100% { opacity: 0; } 93% { opacity: .55; } 94% { opacity: 0; } 95% { opacity: .35; } 96% { opacity: 0; } }

.wx-hero-inner { position: relative; z-index: 2; }
.wx-place { font-family: 'Caveat', cursive; font-size: 1.75rem; margin: 0 0 2px; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.wx-asof { font-size: .78rem; opacity: .85; margin-bottom: 12px; }
.wx-now { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.wx-now-icon { font-size: 3.6rem; line-height: 1; filter: drop-shadow(0 3px 6px rgba(0,0,0,.3)); }
.wx-now-temp { font-size: 3.9rem; font-weight: 700; line-height: 1; text-shadow: 0 2px 8px rgba(0,0,0,.32); }
.wx-now-desc { font-size: 1.15rem; font-weight: 600; }
.wx-now-sub { font-size: .9rem; opacity: .92; }
.wx-hero-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 10px; margin-top: 18px;
}
.wx-hstat {
    background: rgba(255, 255, 255, .16); backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; padding: 8px 10px;
}
.wx-hstat .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; }
.wx-hstat .v { font-size: 1.02rem; font-weight: 700; }
.wx-hstat .n { font-size: .68rem; opacity: .82; }

/* ---------- generic card ---------- */
.wx-card {
    background: #fbf7ef; border: 1px solid #e6ddcd; border-radius: 14px;
    padding: 18px 20px; box-shadow: 0 2px 10px rgba(90, 70, 45, .07);
}
.wx-card h3 {
    margin: 0 0 14px; font-size: 1.12rem; color: #4a3520;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.wx-card h3 .sub { font-size: .74rem; font-weight: 400; color: #9c8b74; margin-left: auto; }

/* ---------- alerts ---------- */
.wx-alert {
    border-radius: 12px; padding: 14px 16px; margin-bottom: 10px;
    border-left: 6px solid #b5651d; background: #fdf1e3; color: #5a3a17;
}
.wx-alert.severe { border-left-color: #a33; background: #fbe9e9; color: #6b1f1f; }
.wx-alert .ev { font-weight: 700; margin-bottom: 3px; }
.wx-alert .hl { font-size: .88rem; line-height: 1.45; }
.wx-alert details { margin-top: 7px; }
.wx-alert summary { cursor: pointer; font-size: .8rem; font-weight: 600; }
.wx-alert pre { white-space: pre-wrap; font-family: inherit; font-size: .83rem; line-height: 1.5; margin: 8px 0 0; }

/* ---------- vanlife score cards ---------- */
.wx-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.wx-score {
    background: #fff; border: 1px solid #e6ddcd; border-radius: 12px; padding: 13px 15px;
    display: flex; flex-direction: column; gap: 7px;
}
.wx-score .top { display: flex; align-items: center; gap: 9px; }
.wx-score .ico { font-size: 1.45rem; }
.wx-score .ttl { font-weight: 700; color: #4a3520; font-size: .94rem; }
.wx-score .lbl { margin-left: auto; font-size: .76rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.lbl-great { background: #e3f0dd; color: #35602c; }
.lbl-good  { background: #eef3dc; color: #5c6b28; }
.lbl-fair  { background: #fbf0d8; color: #8a6414; }
.lbl-poor  { background: #f8e4dc; color: #96401f; }
.wx-bar { height: 7px; border-radius: 999px; background: #ece4d6; overflow: hidden; }
.wx-bar span { display: block; height: 100%; border-radius: 999px; transition: width .8s ease; }
.bar-great { background: linear-gradient(90deg, #7a9c5c, #4f7a3a); }
.bar-good  { background: linear-gradient(90deg, #a8b56a, #7a9c5c); }
.bar-fair  { background: linear-gradient(90deg, #e0b45f, #c98f3c); }
.bar-poor  { background: linear-gradient(90deg, #dd9370, #b4562f); }
.wx-score .note { font-size: .8rem; color: #6d6152; line-height: 1.45; }

/* ---------- hourly ---------- */
.wx-hours { display: flex; gap: 9px; overflow-x: auto; padding: 4px 2px 12px; scrollbar-width: thin; }
.wx-hour {
    flex: 0 0 auto; width: 74px; text-align: center; background: #fff;
    border: 1px solid #e6ddcd; border-radius: 11px; padding: 10px 5px;
}
.wx-hour.is-now { border-color: #c1673f; box-shadow: 0 0 0 2px rgba(193, 103, 63, .18); }
.wx-hour.is-night { background: #f1eee8; }
.wx-hour .h { font-size: .72rem; color: #8a7c68; font-weight: 600; }
.wx-hour .i { font-size: 1.32rem; margin: 3px 0; }
.wx-hour .t { font-weight: 700; color: #4a3520; }
.wx-hour .p { font-size: .7rem; color: #4a7fa5; }
.wx-hour .w { font-size: .68rem; color: #8a7c68; }

/* ---------- svg charts ---------- */
.wx-chart { width: 100%; overflow-x: auto; }
.wx-chart svg { display: block; min-width: 620px; }
.wx-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .76rem; color: #7d7060; margin-top: 6px; }
.wx-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }

/* ---------- daily forecast rows ---------- */
.wx-days { display: flex; flex-direction: column; }
.wx-day {
    display: grid; grid-template-columns: 92px 40px 1fr 132px 84px;
    align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid #efe7d9;
}
.wx-day:last-child { border-bottom: none; }
.wx-day .d { font-weight: 700; color: #4a3520; font-size: .88rem; }
.wx-day .d small { display: block; font-weight: 400; color: #9c8b74; font-size: .72rem; }
.wx-day .i { font-size: 1.4rem; text-align: center; }
.wx-day .desc { font-size: .82rem; color: #6d6152; }
.wx-range { display: flex; align-items: center; gap: 8px; font-size: .84rem; }
.wx-range .lo { color: #7b93a8; width: 34px; text-align: right; }
.wx-range .hi { color: #b4562f; font-weight: 700; width: 34px; }
.wx-range .track { flex: 1; height: 6px; background: #ece4d6; border-radius: 999px; position: relative; }
.wx-range .fill {
    position: absolute; height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, #8fb0c6, #e0b45f, #c9663c);
}
.wx-day .extra { font-size: .76rem; color: #7d7060; text-align: right; }
.wx-day .extra .pop { color: #4a7fa5; font-weight: 600; }
@media (max-width: 720px) {
    .wx-day { grid-template-columns: 74px 32px 1fr 74px; }
    .wx-day .desc { display: none; }
}

/* ---------- sun & moon ---------- */
.wx-sunmoon { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .wx-sunmoon { grid-template-columns: 1fr; } }
.wx-arc { position: relative; }
.wx-arc svg { width: 100%; height: auto; }
.wx-moon-face {
    width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 10px;
    background: #3a3a44; position: relative; overflow: hidden;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, .55), 0 0 22px rgba(240, 235, 210, .25);
}
.wx-moon-lit {
    position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle at 38% 32%, #fdfaf0, #ddd6bd 62%, #b9b19a);
}
.wx-moon-shadow { position: absolute; inset: 0; border-radius: 50%; background: #33333d; }
.wx-kv { display: flex; justify-content: space-between; font-size: .85rem; padding: 5px 0; border-bottom: 1px dashed #ece4d6; }
.wx-kv:last-child { border-bottom: none; }
.wx-kv span:first-child { color: #7d7060; }
.wx-kv span:last-child { font-weight: 600; color: #4a3520; }

/* ---------- air quality ---------- */
.wx-aq { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.wx-aq-item { text-align: center; background: #fff; border: 1px solid #e6ddcd; border-radius: 12px; padding: 12px 8px; }
.wx-aq-val { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.wx-aq-name { font-size: .74rem; color: #8a7c68; text-transform: uppercase; letter-spacing: .05em; }
.wx-aq-lbl { font-size: .78rem; font-weight: 600; margin-top: 3px; }

/* ---------- radar ---------- */
#wx-radar { height: 380px; border-radius: 12px; overflow: hidden; border: 1px solid #e6ddcd; }
.wx-radar-ctl { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.wx-radar-ctl input[type=range] { flex: 1; min-width: 150px; accent-color: #c1673f; }
.wx-radar-time { font-size: .82rem; color: #6d6152; font-weight: 600; min-width: 118px; }
.wx-radar-scale { display: flex; align-items: center; gap: 6px; font-size: .72rem; color: #8a7c68; }
.wx-radar-scale .sw { width: 15px; height: 10px; border-radius: 2px; }

/* ---------- NWS prose ---------- */
.wx-periods { display: flex; flex-direction: column; gap: 10px; }
.wx-period {
    border-left: 4px solid #7a8b5a; background: #fff; border-radius: 0 10px 10px 0;
    padding: 10px 14px; border-top: 1px solid #efe7d9; border-right: 1px solid #efe7d9; border-bottom: 1px solid #efe7d9;
}
.wx-period.night { border-left-color: #4a5a7a; background: #f7f5f1; }
.wx-period .pn { font-weight: 700; color: #4a3520; font-size: .9rem; }
.wx-period .pt { float: right; font-weight: 700; color: #b4562f; }
.wx-period .pd { font-size: .85rem; color: #5f5548; line-height: 1.55; margin-top: 4px; clear: both; }
.wx-afd pre {
    white-space: pre-wrap; font-family: 'Source Serif 4', Georgia, serif; font-size: .84rem;
    line-height: 1.6; color: #5f5548; background: #fff; border: 1px solid #efe7d9;
    border-radius: 10px; padding: 14px; max-height: 340px; overflow-y: auto; margin: 0;
}
.wx-afd summary { cursor: pointer; font-weight: 600; color: #4a3520; padding: 4px 0; }

/* ---------- misc ---------- */
.wx-trend { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; }
.wx-loading { text-align: center; padding: 40px 20px; color: #8a7c68; }
.wx-spin {
    width: 30px; height: 30px; border: 3px solid #e6ddcd; border-top-color: #c1673f;
    border-radius: 50%; margin: 0 auto 12px; animation: wx-rot .9s linear infinite;
}
@keyframes wx-rot { to { transform: rotate(360deg); } }
.wx-src { font-size: .76rem; color: #a3937c; line-height: 1.6; }
.wx-src a { color: #8a7c68; }
.wx-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.wx-chip {
    background: #f0eadd; border: 1px solid #e0d6c4; color: #6d6152;
    border-radius: 999px; padding: 4px 11px; font-size: .78rem; cursor: pointer;
}
.wx-chip:hover { background: #e6dcc9; color: #4a3520; }
