.weather-widget {
    --weather-bg: #ffffff;
    --weather-text: #17251f;
    --weather-muted: #718078;
    --weather-border: #e5ebe7;

    width: 100%;
    max-width: 850px;
    margin: 25px auto;
    padding: 26px;
    background: var(--weather-bg);
    color: var(--weather-text);
    border: 1px solid var(--weather-border);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,.06);
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.weather-widget * {
    box-sizing: border-box;
}

.weather-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 25px;
}

.weather-kicker {
    color: #25845a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.weather-header h2 {
    margin: 7px 0;
    font-size: 23px;
}

.weather-header p {
    color: var(--weather-muted);
    margin: 0;
    font-size: 13px;
}

.weather-header-icon {
    font-size: 43px;
}

.weather-current {
    padding: 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, #eaf5ef, #f5f8f6);
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 20px;
}

.weather-icon {
    font-size: 65px;
    line-height: 1;
}

.weather-temperature {
    font-size: 43px;
    font-weight: 800;
}

#weatherDescription {
    color: var(--weather-muted);
    font-size: 14px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.weather-details > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    background: rgba(255,255,255,.7);
    border-radius: 12px;
}

.weather-details span {
    font-size: 19px;
}

.weather-details small {
    color: var(--weather-muted);
}

.weather-details strong {
    font-size: 14px;
}

.training-status {
    margin-top: 20px;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid #999;
    background: #f1f3f2;
}

.training-status.green {
    background: #eaf7ee;
    border-color: #249b50;
}

.training-status.yellow {
    background: #fff5dc;
    border-color: #e6a21a;
}

.training-status.red {
    background: #ffeded;
    border-color: #dc3434;
}

.training-status-top {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 800;
}

.training-status-top span:first-child {
    font-size: 27px;
}

.training-status p {
    margin: 12px 0;
    line-height: 1.6;
    font-size: 14px;
}

.training-reason {
    font-size: 13px;
    color: #626b65;
    line-height: 1.5;
}

.training-date {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.1);
    font-size: 13px;
}

.weather-forecast {
    margin-top: 27px;
}

.weather-forecast h3 {
    font-size: 17px;
    margin-bottom: 15px;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    padding: 15px 8px;
    border: 1px solid var(--weather-border);
    border-radius: 14px;
    background: #fafcfb;
}

.forecast-day .day-name {
    font-size: 13px;
    font-weight: bold;
}

.forecast-day .day-icon {
    font-size: 29px;
}

.forecast-day .day-temperature {
    font-size: 15px;
    font-weight: bold;
}

.forecast-day .day-rain {
    color: #3985bd;
    font-size: 11px;
}

.weather-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    color: var(--weather-muted);
    font-size: 12px;
}

.weather-footer button,
#weatherRetry {
    border: 0;
    background: #1e6847;
    color: white;
    padding: 10px 15px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: bold;
}

.weather-footer button:hover,
#weatherRetry:hover {
    background: #154d34;
}

.weather-disclaimer {
    margin-top: 18px;
    padding: 13px;
    border-radius: 10px;
    background: #f4f5f4;
    color: #626b65;
    font-size: 12px;
    line-height: 1.6;
}

.weather-loading {
    padding: 30px;
    text-align: center;
    color: var(--weather-muted);
}

.weather-error {
    padding: 20px;
    background: #fff0f0;
    border-radius: 12px;
    color: #a32929;
}

.weather-error p {
    font-size: 13px;
    line-height: 1.5;
}

[hidden] {
    display: none !important;
}

@media (max-width: 550px) {
    .weather-widget {
        padding: 17px;
        border-radius: 15px;
    }

    .weather-header h2 {
        font-size: 19px;
    }

    .weather-header-icon {
        font-size: 32px;
    }

    .weather-temperature {
        font-size: 35px;
    }

    .weather-icon {
        font-size: 50px;
    }

    .weather-details {
        gap: 6px;
    }

    .weather-details > div {
        padding: 9px 6px;
    }

    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .weather-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
