/**
 * IRK Weather — /weather/ page layout.
 * Uses theme tokens (--bg-card, --text, etc.) so it flips cleanly in dark mode.
 */

.irk-weather-page {
    width: calc(100% - var(--space-outer, 20px) * 2);
    max-width: 80rem;
    margin: 2rem auto;
    color: var(--text);
}

.irk-weather-page__head {
    margin: 0 0 1.5rem;
}

.irk-weather-page__title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.02em;
}

.irk-weather-page__layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: stretch;
}

@media (max-width: 1023px) {
    /* Flexbox on the page so every section is an order-able sibling. The
       layout wrapper melts (display: contents) so aside + map promote into
       the same flex flow as head / daily / cities. */
    .irk-weather-page {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .irk-weather-page__layout { display: contents; }

    /* `gap` collapses default section margins — reset them to avoid double spacing. */
    .irk-weather-daily,
    .irk-weather-cities { margin-top: 0; margin-bottom: 0; }

    /* Mobile reading order: title → current → 10-day → map → cities. */
    .irk-weather-page__head    { order: 1; }
    .irk-weather-page__aside   { order: 2; }
    .irk-weather-daily         { order: 3; }
    .irk-weather-page__map     { order: 4; min-height: 320px; }
    .irk-weather-cities        { order: 5; }
}

.irk-weather-page__map {
    position: relative;
    min-height: 520px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--bg-card-3);
    box-shadow: 0 4px 18px rgba(10, 17, 40, 0.08);
}

.irk-weather-page__aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.irk-weather-page__head-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.irk-weather-page__icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.irk-weather-page__temp {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--text);
}

.irk-weather-page__description {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dim);
}

.irk-weather-page__stats {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.irk-weather-page__stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.irk-weather-page__stat-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.irk-weather-page__stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

/* ============================================================
 * 10-day forecast row.
 * ============================================================ */
.irk-weather-daily {
    margin-top: 2rem;
}

.irk-weather-daily__title,
.irk-weather-cities__title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 1rem;
    color: var(--text);
}

.irk-weather-daily__list {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}

@media (max-width: 1023px) {
    .irk-weather-daily__list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 600px) {
    .irk-weather-daily__list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.irk-weather-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.irk-weather-day__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.irk-weather-day__icon {
    width: 34px;
    height: 34px;
}

.irk-weather-day__temps {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.irk-weather-day__max {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text);
}

.irk-weather-day__min {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dim);
}

.irk-weather-day__desc {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    line-height: 1.3;
}

.irk-weather-daily__placeholder,
.irk-weather-cities__placeholder {
    padding: 1.25rem;
    grid-column: 1 / -1;
    color: var(--text-dim);
    text-align: center;
}

/* ============================================================
 * Cities grid.
 * ============================================================ */
.irk-weather-cities {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

.irk-weather-cities__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.irk-weather-city {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;

    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.15s, background-color 0.15s;
}

.irk-weather-city:hover {
    border-color: var(--accent, var(--color-primary));
    background: var(--bg-card-2);
}

.irk-weather-city__icon {
    width: 36px;
    height: 36px;
}

.irk-weather-city__info {
    min-width: 0;
}

.irk-weather-city__name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}

.irk-weather-city__desc {
    font-size: 0.75rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.irk-weather-city__temp {
    font-size: 1.375rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
