/**
 * Weather Widget Styles
 * Mobile-first responsive design
 */

/* Container */
.weather-widget {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    border-radius: 12px;
    padding: 1rem;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 100%;
    font-family: inherit;
}

/* Error State */
.weather-widget__error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.weather-widget__error-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    opacity: 0.8;
}

.weather-widget__error-content {
    flex: 1;
}

.weather-widget__error-title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}

.weather-widget__error-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    opacity: 0.8;
}

/* Content Container */
.weather-widget__content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.weather-widget__content--stale {
    opacity: 0.85;
}

/* Location */
.weather-widget__location {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.weather-widget__location-icon {
    width: 14px;
    height: 14px;
}

/* Main Weather Display */
.weather-widget__main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.weather-widget__icon-wrapper {
    flex-shrink: 0;
}

.weather-widget__icon-wrapper svg {
    width: 48px;
    height: 48px;
    stroke: currentColor;
}

.weather-widget__temp {
    display: flex;
    align-items: flex-start;
    gap: 0.125rem;
}

.weather-widget__temp-value {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.weather-widget__temp-unit {
    font-size: 1.125rem;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 0.25rem;
}

/* Wind Info */
.weather-widget__wind {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-widget__wind-icon {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.weather-widget__wind-text {
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Meta Info (Timestamp + Stale Badge) */
.weather-widget__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    opacity: 0.75;
}

.weather-widget__stale-badge {
    display: flex;
    align-items: center;
    color: #fbbf24;
}

.weather-widget__stale-badge svg {
    width: 16px;
    height: 16px;
}

/* Tablet and Desktop Styles */
@media (min-width: 640px) {
    .weather-widget {
        padding: 1.25rem;
    }

    .weather-widget__main {
        gap: 1rem;
    }

    .weather-widget__icon-wrapper svg {
        width: 56px;
        height: 56px;
    }

    .weather-widget__temp-value {
        font-size: 3rem;
    }

    .weather-widget__temp-unit {
        font-size: 1.25rem;
    }

    .weather-widget__wind-text {
        font-size: 1rem;
    }
}

/* Desktop Horizontal Layout */
@media (min-width: 768px) {
    .weather-widget__content {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .weather-widget__location {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .weather-widget__main {
        flex: 1;
        padding: 0;
        border: none;
    }

    .weather-widget__wind {
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.2);
        padding: 0 0 0 1rem;
    }

    .weather-widget__meta {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 0.5rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .weather-widget {
        transition: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .weather-widget {
        background: #0369a1;
        border: 2px solid #ffffff;
    }

    .weather-widget__wind,
    .weather-widget__meta {
        border-color: rgba(255, 255, 255, 0.5);
    }
}

/* Dark Mode Support (if site has dark mode) */
@media (prefers-color-scheme: dark) {
    .weather-widget {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    }
}

/* Print Styles */
@media print {
    .weather-widget {
        background: #f0f9ff !important;
        color: #0c4a6e !important;
        border: 1px solid #0369a1;
        box-shadow: none;
    }

    .weather-widget__stale-badge {
        color: #b45309;
    }
}
