/* --- Weather Widget --- */
.weather-widget {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    color: var(--weather-text);
    box-shadow: 0 4px 12px var(--weather-shadow);
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.weather-clear {
    background: var(--weather-clear-bg);
}

.weather-partly-cloudy {
    background: var(--weather-partly-cloudy-bg);
}

.weather-foggy {
    background: var(--weather-foggy-bg);
}

.weather-rainy {
    background: var(--weather-rainy-bg);
}

.weather-snowy {
    background: var(--weather-snowy-bg);
}

.weather-stormy {
    background: var(--weather-stormy-bg);
}

.weather-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-location {
    font-size: 1.4em;
    font-weight: bold;
    text-shadow: 1px 1px 2px var(--weather-shadow);
}

.weather-date {
    font-size: 0.9em;
    color: var(--weather-text-secondary);
    margin-top: 4px;
}

.weather-content {
    padding: 10px;
}

.weather-now {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    position: relative;
}

.weather-now-icon {
    font-size: 2rem;
}

.weather-now-icon i {
    font-size: 3.5rem;
}

.weather-now-temp {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 5px 0;
    text-shadow: 1px 1px 2px var(--weather-shadow);
}

.weather-now-condition {
    margin-bottom: 8px;
}

.weather-now-details {
    display: flex;
    gap: 20px;
    margin-top: 5px;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.weather-forecast {
    display: flex;
    overflow-x: auto;
    padding: 15px 0;
    margin-top: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.weather-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px;
    min-width: 70px;
    text-align: center;
}

.weather-hour-time {
    font-size: 0.9em;
    color: var(--weather-text-secondary);
    margin-bottom: 5px;
}

.weather-hour-icon i {
    font-size: 1.8rem;
}

.weather-hour-temp {
    font-weight: bold;
    margin: 5px 0;
}

.weather-hour-precip {
    font-size: 0.8em;
    color: var (--weather-text-secondary);
    display: flex;
    align-items: center;
}

.weather-hour-precip::before {
    content: "☂️";
    margin-right: 2px;
    font-size: 0.8em;
}

/* Handle error messages */
.weather-widget .error-message {
    padding: 15px;
    text-align: center;
    color: #721c24;
    background-color: #f8d7da;
    border-radius: 8px;
    margin: 10px 0;
}

/* Make the weather widget responsive */
@media (min-width: 576px) {
    .weather-content {
        display: flex;
    }
    
    .weather-now {
        width: 40%;
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .weather-forecast {
        width: 60%;
        margin-top: 0;
        padding: 0;
    }
}