.weather-page {
    --weather-blue: #5cc5ff;
    --weather-gold: #d8b000;
    --weather-red: #ff6262;
    width: 100%;
    min-width: 0;
}

.weather-page,
.weather-page * {
    box-sizing: border-box;
}

.weather-operation-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    background: var(--border-color);
}

.weather-operation-strip > div {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 14px 16px;
    background: var(--bg-card);
}

.weather-operation-strip span,
.weather-current p,
.weather-source-card p {
    color: var(--text-secondary);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.weather-operation-strip strong {
    min-width: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: .82rem;
    overflow-wrap: anywhere;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.weather-current-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(220px, .45fr);
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.weather-current-layout > *,
.weather-forecast-panel,
.weather-alerts-panel {
    min-width: 0;
}

.weather-current {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 22px;
}

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

.weather-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(92, 197, 255, .35);
    border-radius: 18px;
    color: var(--weather-blue);
    background: linear-gradient(145deg, rgba(92, 197, 255, .13), rgba(92, 197, 255, .035));
    box-shadow: inset 0 0 20px rgba(92, 197, 255, .04);
    font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif;
    line-height: 1;
}

.weather-icon--current {
    width: 76px;
    height: 76px;
    font-size: 2.7rem;
}

.weather-icon--hourly {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    font-size: 1.65rem;
}

.weather-icon--sunny {
    border-color: rgba(255, 202, 62, .5);
    background: rgba(255, 202, 62, .09);
}

.weather-icon--rain,
.weather-icon--thunderstorm {
    border-color: rgba(94, 143, 255, .52);
    background: rgba(56, 93, 177, .14);
}

.weather-icon--snow,
.weather-icon--fog {
    border-color: rgba(220, 235, 245, .4);
    background: rgba(220, 235, 245, .08);
}

.weather-current__primary > div {
    min-width: 0;
}

.weather-current__primary strong {
    display: block;
    color: var(--text-primary);
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1;
}

.weather-current__primary > div > span {
    display: block;
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
}

.weather-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
    margin: 0;
}

.weather-metrics > div {
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .035);
}

.weather-metrics dt,
.weather-hour dt {
    color: var(--text-secondary);
    font-size: .65rem;
    text-transform: uppercase;
}

.weather-metrics dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: .83rem;
    font-weight: 800;
}

.weather-current > footer {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: .7rem;
}

.weather-source-card {
    display: grid;
    align-content: center;
    gap: 5px;
    min-width: 0;
}

.weather-source-card strong {
    margin-top: 7px;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: .83rem;
}

.weather-source-card span,
.weather-source-card small {
    color: var(--text-secondary);
    font-size: .72rem;
}

.weather-source-card small {
    margin-top: 10px;
    line-height: 1.5;
}

.weather-temperature-chart {
    width: 100%;
    min-width: 0;
    margin: 0 0 14px;
    padding: 12px 14px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .025);
}

.weather-temperature-chart figcaption {
    color: var(--text-secondary);
    font-size: .7rem;
    font-weight: 700;
}

.weather-temperature-chart svg {
    display: block;
    width: 100%;
    height: 108px;
}

.weather-temperature-chart line {
    stroke: rgba(255, 255, 255, .12);
    stroke-width: 1;
}

.weather-temperature-chart polyline {
    fill: none;
    stroke: var(--weather-gold);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    filter: drop-shadow(0 0 5px rgba(216, 176, 0, .4));
}

.weather-temperature-chart > div {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: .68rem;
}

.weather-hourly {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(165px, 100%), 1fr));
    gap: 9px;
    width: 100%;
    min-width: 0;
    overflow: visible;
    padding: 2px;
}

.weather-hour {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    min-height: 235px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: var(--radius-lg);
    background: rgba(3, 10, 16, .3);
}

.weather-hour time {
    color: var(--text-secondary);
    font-size: .68rem;
}

.weather-hour > strong {
    color: var(--text-primary);
    font-size: 1.45rem;
}

.weather-hour > p {
    min-height: 35px;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: .75rem;
}

.weather-hour dl {
    display: grid;
    gap: 5px;
    min-width: 0;
    margin: auto 0 0;
}

.weather-hour dl > div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.weather-hour dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: .67rem;
    font-weight: 700;
    text-align: right;
}

.weather-alerts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    min-width: 0;
}

.weather-alert {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(92, 197, 255, .18);
    border-left: 4px solid var(--weather-blue);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .025);
}

.weather-alert.is-yellow { border-left-color: #e6c839; }
.weather-alert.is-orange { border-left-color: #ff9d45; }
.weather-alert.is-red { border-left-color: var(--weather-red); }

.weather-alert > span {
    color: var(--text-secondary);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.weather-alert h3 {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: .9rem;
}

.weather-alert p {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--text-secondary);
    font-size: .74rem;
    line-height: 1.55;
}

.weather-alert footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: .66rem;
}

.weather-alert a {
    overflow-wrap: anywhere;
    color: var(--weather-blue);
    font-weight: 800;
}

.weather-empty-state {
    display: grid;
    align-content: center;
    min-width: 0;
    min-height: 280px;
    place-items: start;
    gap: 10px;
}

.weather-empty-state > span {
    color: var(--weather-gold);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.weather-empty-state h2,
.weather-empty-state p {
    margin: 0;
    overflow-wrap: anywhere;
}

.weather-empty-state p {
    color: var(--text-secondary);
}

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

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

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

    .weather-current-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .weather-operation-strip,
    .weather-metrics {
        grid-template-columns: 1fr;
    }

    .weather-current {
        padding: 16px;
    }

    .weather-current__primary {
        align-items: flex-start;
    }

    .weather-current__primary strong {
        font-size: 2.35rem;
    }

    .weather-alert footer {
        align-items: flex-start;
        flex-direction: column;
    }

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

@media (max-width: 420px) {
    .weather-current__primary {
        flex-direction: column;
    }

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