/**
 * Weather widget — compact layout structure
 * Background fills live in weather-backgrounds.css; dynamic sky in weather-animations.css.
 */

.weather-widget {
    position: relative;
}

.weather-widget .weather-content {
    position: relative;
    z-index: 2;
}

.weather-widget .weather-content-wrapper {
    position: relative;
    z-index: 2;
}

/* -------------------------------------------------------------------------- */
/* Summary layout                                                             */
/* -------------------------------------------------------------------------- */

.weather-layout-summary .weather-layout-summary__hero {
    margin-bottom: 0.25rem;
}

.weather-layout-summary .weather-layout-summary__temp-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.weather-layout-summary .weather-layout-summary__readout {
    flex: 1 1 auto;
    min-width: 0;
}

.weather-layout-summary .weather-layout-summary__icon {
    flex-shrink: 0;
    line-height: 1;
}

.weather-layout-summary .weather-layout-summary__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.weather-layout-summary .weather-layout-summary__meta-sep {
    opacity: 0.65;
}

.weather-layout-summary .weather-layout-summary__forecast {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.weather-layout-summary__forecast-day,
.weather-layout-strip__forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.5rem 0.35rem;
    border-radius: 0.5rem;
    text-align: center;
    min-width: 0;
}

.weather-layout-forecast-day__label {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
}

.weather-layout-forecast-day__icon {
    line-height: 1;
}

.weather-layout-forecast-day__hi {
    font-size: 0.875rem;
    line-height: 1.2;
}

.weather-layout-forecast-day__lo {
    font-size: 0.75rem;
    line-height: 1.2;
}

/* -------------------------------------------------------------------------- */
/* Strip layout                                                               */
/* -------------------------------------------------------------------------- */

.weather-layout-strip .weather-layout-strip__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.weather-layout-strip .weather-layout-strip__icon {
    flex-shrink: 0;
    line-height: 1;
}

.weather-layout-strip .weather-layout-strip__readout {
    flex: 1 1 auto;
    min-width: 0;
}

.weather-layout-strip .weather-layout-strip__temp-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
}

.weather-layout-strip .weather-layout-strip__forecast {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.weather-layout-strip .weather-layout-strip__forecast-day {
    padding: 0.35rem 0.2rem;
}

/* -------------------------------------------------------------------------- */
/* Collapsible layout                                                         */
/* -------------------------------------------------------------------------- */

.weather-layout-collapsible .weather-layout-collapsible__bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.weather-layout-collapsible .weather-layout-collapsible__summary {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.1rem;
    min-width: 0;
}

.weather-layout-collapsible .weather-layout-collapsible__chevron {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.weather-layout-collapsible .weather-layout-collapsible__bar[aria-expanded="true"] .weather-layout-collapsible__chevron {
    transform: rotate(180deg);
}

.weather-layout-collapsible .weather-layout-collapsible__panel {
    margin-top: 0.65rem;
}

.weather-layout-collapsible .weather-layout-collapsible__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.weather-layout-collapsible .weather-layout-collapsible__forecast {
    margin-top: 0;
}

/* -------------------------------------------------------------------------- */
/* Full layout helpers (Tailwind CDN fallback for bundled themes)             */
/* -------------------------------------------------------------------------- */

.weather-widget .weather-location {
    line-height: 1.4;
}

.weather-layout-full .grid.grid-cols-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-layout-full .gap-4 {
    gap: 1rem;
}

.weather-layout-full .space-y-2 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.5rem;
}

.weather-layout-full .flex.items-center.justify-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-layout-full .flex.items-center.gap-3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Forecast pill surfaces on light backgrounds only */
.weather-bg-plain .weather-layout-summary__forecast-day,
.weather-bg-plain .weather-layout-strip__forecast-day,
.weather-bg-soft .weather-layout-summary__forecast-day,
.weather-bg-soft .weather-layout-strip__forecast-day,
.weather-bg-transparent .weather-layout-summary__forecast-day,
.weather-bg-transparent .weather-layout-strip__forecast-day {
    background: rgba(15, 23, 42, 0.04);
}

@media (max-width: 380px) {
    .weather-layout-summary .weather-layout-summary__forecast,
    .weather-layout-strip .weather-layout-strip__forecast {
        gap: 0.35rem;
    }

    .weather-layout-summary__forecast-day,
    .weather-layout-strip__forecast-day {
        padding: 0.4rem 0.2rem;
    }
}
