/* Weather module v3 · Odesa */
.weather-clean-page {
    padding-top: 18px;
}

.weather-current-card {
    display: grid;
    grid-template-columns: minmax(260px, .85fr) minmax(0, 1.4fr);
    gap: 22px;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 4% 12%, rgba(255, 215, 0, .16), transparent 28%),
        linear-gradient(145deg, #ffffff, #f2faff);
}

.weather-current-card.is-stale {
    border-color: #f3cf84;
}

.weather-current-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.weather-current-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    flex: 0 0 86px;
    border-radius: 24px;
    background: rgba(255,255,255,.86);
    border: 1px solid #d7e8f2;
    box-shadow: 0 12px 28px rgba(20, 108, 153, .08);
    font-size: 46px;
    line-height: 1;
}

.weather-current-copy {
    min-width: 0;
}

.weather-temperature-row {
    display: grid;
    gap: 3px;
    margin-top: 3px;
}

.weather-temperature-row > strong {
    color: #092f4c;
    font-size: clamp(42px, 5vw, 66px);
    line-height: .98;
    letter-spacing: -.055em;
}

.weather-temperature-row > span {
    color: #39586e;
    font-size: 16px;
    font-weight: 800;
}

.weather-updated {
    margin: 8px 0 0;
    color: #6b7f8e;
    font-size: 13px;
}

.weather-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.weather-stat-grid > div,
.weather-detail-stats > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 13px 12px;
    border: 1px solid #dbe8ef;
    border-radius: 14px;
    background: rgba(255,255,255,.82);
}

.weather-stat-grid span,
.weather-detail-stats span {
    color: #708493;
    font-size: 12px;
    font-weight: 700;
}

.weather-stat-grid strong,
.weather-detail-stats strong {
    color: #102f45;
    font-size: 16px;
}

.weather-stale-notice {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border: 1px solid #f2d29b;
    border-radius: 12px;
    background: #fff8e8;
    color: #805414;
    font-size: 13px;
    font-weight: 700;
}

.weather-section-head {
    margin-bottom: 12px;
}

.weather-days-heading p {
    margin: 5px 0 0;
    color: #6a7f8e;
    font-size: 13px;
}

.weather-hourly-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(106px, 116px);
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
    padding: 2px 1px 8px;
}

.weather-hour-card {
    display: grid;
    justify-items: center;
    gap: 6px;
    min-height: 154px;
    padding: 11px 9px;
    border: 1px solid #dce8ef;
    border-radius: 14px;
    background: #f9fcfe;
    text-align: center;
    scroll-snap-align: start;
}

.weather-hour-card time {
    color: #5e7382;
    font-size: 12px;
    font-weight: 800;
}

.weather-hour-card strong {
    color: #102f45;
    font-size: 17px;
}

.weather-hour-card small {
    color: #637887;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.weather-hour-icon {
    font-size: 29px;
    line-height: 1.1;
}

/* 7-day forecast */
.weather-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.weather-day-card {
    position: relative;
    display: grid;
    align-content: start;
    min-width: 0;
    min-height: 198px;
    padding: 13px 11px 11px;
    border: 1px solid #dce8ef;
    border-radius: 15px;
    background: linear-gradient(160deg, #ffffff, #f6fbfe);
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.weather-day-card:hover,
.weather-day-card:focus-visible {
    transform: translateY(-2px);
    border-color: #9fcbe2;
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 92, 132, .09);
    outline: none;
}

.weather-day-card.is-selected {
    border-color: #54a9d6;
    background: linear-gradient(160deg, #f4fbff, #ffffff);
    box-shadow: inset 0 0 0 1px rgba(84,169,214,.14), 0 10px 24px rgba(17, 92, 132, .08);
}

.weather-day-name {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
}

.weather-day-name strong {
    color: #123d5b;
    font-size: 14px;
}

.weather-day-name span {
    color: #82929e;
    font-size: 11px;
    font-weight: 700;
}

.weather-day-icon {
    display: block;
    margin: 10px 0 5px;
    font-size: 31px;
    line-height: 1;
}

.weather-day-card p {
    min-height: 34px;
    margin: 3px 0 8px;
    color: #607786;
    font-size: 12px;
    line-height: 1.35;
}

.weather-day-temperatures {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.weather-day-temperatures strong {
    color: #102f45;
    font-size: 18px;
}

.weather-day-temperatures span {
    color: #7890a0;
    font-size: 13px;
    font-weight: 800;
}

.weather-day-rain {
    margin-top: 5px;
    color: #54758a;
    font-size: 12px;
    font-weight: 700;
}

.weather-day-open {
    align-self: end;
    margin-top: 10px;
    color: #1877a8;
    font-size: 11px;
    font-weight: 800;
}

/* selected day */
.weather-day-detail {
    scroll-margin-top: 16px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(76, 176, 226, .11), transparent 34%),
        linear-gradient(145deg, #ffffff, #f8fcfe);
}

.weather-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2edf3;
}

.weather-detail-hero h2 {
    margin: 4px 0 4px;
    color: #103c5b;
    font-size: clamp(24px, 3vw, 34px);
}

.weather-detail-hero p {
    margin: 0;
    color: #607786;
    font-weight: 700;
}

.weather-detail-main-values {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.weather-detail-icon {
    font-size: 48px;
    line-height: 1;
}

.weather-detail-main-values > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.weather-detail-main-values strong {
    color: #0e3c5d;
    font-size: 38px;
    letter-spacing: -.04em;
}

.weather-detail-main-values span {
    color: #7b91a0;
    font-size: 20px;
    font-weight: 800;
}

.weather-detail-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.weather-detail-hourly {
    margin-top: 20px;
    padding-top: 17px;
    border-top: 1px solid #e2edf3;
}

.weather-detail-hourly-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.weather-detail-hourly-head h3 {
    margin: 0;
    color: #123d5b;
    font-size: 20px;
}

.weather-detail-hourly-head span {
    color: #718695;
    font-size: 12px;
    font-weight: 700;
}

.weather-source-note {
    margin-top: 14px;
}

.weather-back-actions {
    margin: 10px 0 16px;
}

.weather-empty-card {
    display: flex;
    align-items: center;
    gap: 16px;
}

.weather-empty-icon {
    font-size: 46px;
}

@media (max-width: 1050px) {
    .weather-day-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .weather-detail-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .weather-current-card {
        grid-template-columns: 1fr;
    }

    .weather-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .weather-clean-page {
        padding-top: 12px;
    }

    .weather-current-card {
        gap: 16px;
        padding: 16px;
    }

    .weather-current-icon {
        width: 68px;
        height: 68px;
        flex-basis: 68px;
        border-radius: 19px;
        font-size: 38px;
    }

    .weather-temperature-row > strong {
        font-size: 43px;
    }

    .weather-temperature-row > span {
        font-size: 14px;
    }

    .weather-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weather-stat-grid > div {
        padding: 11px;
    }

    .weather-stat-grid > div:last-child {
        grid-column: 1 / -1;
    }

    .weather-hourly-scroll {
        grid-auto-columns: 104px;
        margin-right: -4px;
    }

    .weather-hour-card {
        min-height: 148px;
    }

    .weather-day-grid {
        display: grid;
        grid-auto-flow: column;
        grid-template-columns: none;
        grid-auto-columns: 132px;
        gap: 8px;
        overflow-x: auto;
        margin-right: -6px;
        padding: 2px 6px 9px 1px;
        scroll-snap-type: x mandatory;
        scrollbar-width: thin;
    }

    .weather-day-card {
        min-height: 191px;
        scroll-snap-align: start;
    }

    .weather-day-card p {
        min-height: 32px;
    }

    .weather-detail-hero {
        align-items: flex-start;
        gap: 10px;
    }

    .weather-detail-main-values {
        gap: 7px;
    }

    .weather-detail-icon {
        font-size: 37px;
    }

    .weather-detail-main-values strong {
        font-size: 29px;
    }

    .weather-detail-main-values span {
        font-size: 16px;
    }

    .weather-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .weather-detail-stats > div {
        padding: 11px;
    }

    .weather-detail-hourly-head {
        display: block;
    }

    .weather-detail-hourly-head span {
        display: block;
        margin-top: 3px;
    }

    .weather-empty-card {
        align-items: flex-start;
        padding: 16px;
    }
}

@media (max-width: 420px) {
    .weather-detail-hero {
        display: block;
    }

    .weather-detail-main-values {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .weather-detail-stats {
        grid-template-columns: 1fr 1fr;
    }
}
