/* ==========================================================================
   webx_weather - Achensee Weather Widget
   ========================================================================== */

:root {
    --weather-primary: #1a5276;
    --weather-primary-light: #2e86c1;
    --weather-bg: #f8f9fa;
    --weather-card-bg: #ffffff;
    --weather-text: #333333;
    --weather-text-muted: #888888;
    --weather-border: #e8e8e8;
    --weather-warning-bg: #fff3cd;
    --weather-warning-border: #ffc107;
    --weather-high: #c0392b;
    --weather-low: #2980b9;
    --weather-radius: 0;
    --weather-gap: 16px;
}


/* Location Tabs */
.weather-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--weather-gap);
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
}

.weather-tab {
    background: transparent;
    color: var(--weather-text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 0;
    padding: 16px 30px;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1.6px;
    font-weight: 500;
    border: solid 2px var(--weather-primary);
    margin-top: 30px;
    margin-bottom: 30px;
}

.weather-tab:hover {
    background: var(--weather-primary);
    color: #fff;
}

.weather-tab--active {
    background: var(--weather-primary);
    color: #fff;
}

/* Warning Banner */
.weather-warning {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: var(--weather-gap);
    border-radius: var(--weather-radius);
    background: var(--weather-warning-bg);
    border-left: 4px solid var(--weather-warning-border);
    font-size: 14px;
}

.weather-warning__icon {
    font-size: 20px;
    flex-shrink: 0;
}

.weather-warning__content strong {
    display: block;
    margin-bottom: 2px;
}

/* Nowcast Hero */
.weather-nowcast {
    background: var(--weather-primary);
    color: #fff;
    border-radius: 0;
    padding: 24px;
    margin-bottom: var(--weather-gap);
}

.weather-nowcast__main {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.weather-nowcast__icon {
    font-size: 56px;
    line-height: 1;
}

.weather-nowcast__degrees {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
}

.weather-nowcast__degrees sup {
    font-size: 24px;
    font-weight: 400;
}

.weather-nowcast__desc {
    display: block;
    opacity: 0.85;
    font-size: 16px;
    margin-top: 4px;
}

.weather-nowcast__details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.weather-detail {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.weather-detail__icon {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

.weather-detail__value {
    display: block;
    font-size: 16px;
    font-weight: 600;
}

.weather-detail__label {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
}

/* Section Container */
.weather-section {
    background: var(--weather-bg);
    border-radius: var(--weather-radius);
    padding: 16px;
    margin-bottom: var(--weather-gap);
}

.weather-section__title {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--weather-text);
    margin: 0 0 12px 0;
}

/* Hourly Forecast */
.weather-hourly {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.weather-hourly__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 56px;
    flex-shrink: 0;
    padding: 8px 4px;
    border-radius: 0;
    transition: background 0.2s;
    cursor: default;
}

.weather-hourly__item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.weather-hourly__item--now {
    background: var(--weather-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 82, 118, 0.3);
}

.weather-hourly__item--now .weather-hourly__time {
    color: #fff;
    font-weight: 700;
}

.weather-hourly__item--now .weather-hourly__temp {
    color: #fff;
}

.weather-hourly__item--next {
    background: rgba(46, 134, 193, 0.1);
}

.weather-hourly__time {
    font-size: 12px;
    color: var(--weather-text-muted);
}

.weather-hourly__icon {
    font-size: 20px;
}

.weather-hourly__temp {
    font-size: 14px;
    font-weight: 600;
}

/* Daily Forecast */
.weather-daily__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--weather-border);
}

.weather-daily__row:last-child {
    border-bottom: none;
}

.weather-daily__day {
    width: 36px;
    font-size: 14px;
    font-weight: 500;
}

.weather-daily__icon {
    font-size: 18px;
    width: 28px;
    text-align: center;
}

.weather-daily__high {
    width: 36px;
    text-align: right;
    font-weight: 600;
    color: var(--weather-high);
    font-size: 14px;
}

.weather-daily__low {
    width: 36px;
    text-align: right;
    color: var(--weather-low);
    font-size: 14px;
}

.weather-daily__bar {
    flex: 1;
    height: 4px;
    background: var(--weather-border);
    border-radius: 2px;
    min-width: 60px;
}

.weather-daily__bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--weather-low), var(--weather-high));
    transition: width 0.3s ease;
}

.weather-daily__rain {
    width: 45px;
    text-align: right;
    font-size: 13px;
    color: var(--weather-text);
}

/* Pollen */
.weather-section--pollen {
    background: transparent;
    border: solid 2px var(--weather-primary);
}

.weather-pollen {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.weather-pollen__item {
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    font-size: 13px;
}

.weather-pollen__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.weather-pollen__name {
    font-weight: 500;
}

.weather-pollen__level {
    font-size: 12px;
    color: var(--weather-text-muted);
}

/* No Data */
.weather-nodata {
    text-align: center;
    padding: 48px 24px;
    color: var(--weather-text-muted);
    font-size: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .weather-nowcast__main {
        flex-wrap: wrap;
    }

    .weather-nowcast__degrees {
        font-size: 36px;
    }

    .weather-nowcast__icon {
        font-size: 40px;
    }

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

    .weather-daily__bar {
        display: none;
    }

    .weather-tabs {
        gap: 6px;
    }

    .weather-tab {
        padding: 6px 14px;
        font-size: 13px;
    }
}
