/* Weather Forecast Block Styles */
.weather-forecast-block {
    display: flex;
    flex-direction: row;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 120px;
    position: relative;
    overflow: hidden;
}

/* Loading state styles */
.weather-forecast-loading {
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.weather-forecast-placeholder {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.weather-forecast-spinner {
    font-size: 24px;
    opacity: 0.8;
}

.weather-forecast-spinner i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.weather-forecast-loading-text {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Error state styles */
.weather-forecast-error {
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #e17055 0%, #d63031 100%);
}

.weather-forecast-error-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.weather-forecast-error-content i {
    font-size: 24px;
    opacity: 0.8;
}

.weather-forecast-error-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.weather-forecast-retry {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weather-forecast-retry:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Loaded state - original styles */
.weather-forecast-loaded {
    flex-direction: row;
}

.weather-forecast-current {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px;
    padding-right: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex: 0 0 auto;
}

.weather-forecast-icon {
    font-size: 48px;
    opacity: 0.9;

}

.weather-forecast-day-icon {
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Weather Icon Colors */
/* Sun icons - bright yellow */
.weather-forecast-icon .fa-sun,
.weather-forecast-day-icon .fa-sun {
    color: #ffd700;
}

/* Cloud-sun icons - yellow sun with white clouds */
.weather-forecast-icon .fa-cloud-sun,
.weather-forecast-day-icon .fa-cloud-sun {
    color: #ffeb3b;
}

/* Cloud icons - light gray/white */
.weather-forecast-icon .fa-cloud,
.weather-forecast-day-icon .fa-cloud {
    color: #f5f5f5;
}

/* Rain icons - blue */
.weather-forecast-icon .fa-cloud-rain,
.weather-forecast-day-icon .fa-cloud-rain,
.weather-forecast-icon .fa-cloud-drizzle,
.weather-forecast-day-icon .fa-cloud-drizzle,
.weather-forecast-icon .fa-cloud-showers-heavy,
.weather-forecast-day-icon .fa-cloud-showers-heavy {
    color: #64b5f6;
}

/* Snow icons - light blue/white */
.weather-forecast-icon .fa-snowflake,
.weather-forecast-day-icon .fa-snowflake {
    color: #e3f2fd;
}

/* Thunderstorm icons - bright yellow/orange */
.weather-forecast-icon .fa-bolt,
.weather-forecast-day-icon .fa-bolt {
    color: #ffb74d;
}

/* Fog/smog icons - gray */
.weather-forecast-icon .fa-smog,
.weather-forecast-day-icon .fa-smog {
    color: #bdbdbd;
}


.weather-forecast-temp {
    flex: 1;

    p {
        padding: 0;
    }
}

.weather-forecast-temp-current {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0;
    line-height: 1;
}

.weather-forecast-location {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 5px 0 0 0;
}

/* Daily forecast - horizontal layout on desktop */
.weather-forecast-daily {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    flex: 1;
    align-items: center;
}

.weather-forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    transition: background-color 0.2s ease;
    min-width: 60px;
    flex: 1;
}

.weather-forecast-day:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.weather-forecast-day-name {
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.weather-forecast-day-icon {
    font-size: 20px;
    opacity: 0.9;
}

.weather-forecast-day-temp {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .weather-forecast-block {
        flex-direction: column;
        padding: 10px 0;
    }

    .weather-forecast-loaded {
        flex-direction: column;
    }

    .weather-forecast-current {
        margin-right: 0;
        margin-bottom: 16px;
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        justify-content: center;
    }

    .weather-forecast-temp-current {
        font-size: 2rem;
    }

    .weather-forecast-daily {
        flex-direction: column;
        gap: 4px;
    }

    .weather-forecast-day {
        min-width: 50px;
        padding: 8px 4px;
        flex-direction: row;

        &:not(:last-child) {
            border-bottom: 1px solid rgba(0, 0, 0, 0.4);
        }
    }

    .weather-forecast-day-name {
        font-size: 0.7rem;
    }

    .weather-forecast-day-icon {
        font-size: 18px;
        margin: 0 10px;
    }

    .weather-forecast-day-temp {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .weather-forecast-icon {
        font-size: 36px;
    }

    .weather-forecast-temp-current {
        font-size: 1.8rem;
    }

    .weather-forecast-day-icon {
        font-size: 16px;
    }
}

/* Accessibility improvements */
.weather-forecast-block:focus-within {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.weather-forecast-retry:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Animation for loaded content */
.weather-forecast-loaded {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
