/*
 * Weather Widget Styles
 * Used on: any page with <div class="wcwp-weather-widget">
 * Mobile bar: .mobile-bar (shown ≤768px)
 * Desktop box: .desktop-box (shown ≥769px)
 * Enqueued by: functions.php via wcwp_enqueue_weather_widget()
 */

.wcwp-weather-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border-radius: 8px;
    padding: 12px 16px;
}

/* Icons hidden by default (shown on mobile only) */
.wcwp-weather-widget .widget-icon {
    display: none;
}

/* Mobile Bar - Hidden on tablet/desktop */
.wcwp-weather-widget.mobile-bar {
    display: none;
}

@media (max-width: 768px) {
    .wcwp-weather-widget.mobile-bar {
        display: flex;
        background: #fff;
        border-radius: 12px;
        padding: 10px 12px;
        justify-content: space-around;
        align-items: center;
        gap: 4px;
        overflow: hidden;
    }
    .wcwp-weather-widget.mobile-bar .widget-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1 1 0;
        min-width: 0;
    }
    /* Hide text labels on mobile, show icons */
    .wcwp-weather-widget.mobile-bar .widget-label {
        display: none;
    }
    .wcwp-weather-widget.mobile-bar .widget-icon {
        display: block;
        width: min(60px, 13vw);
        height: auto;
        margin-bottom: 4px;
    }
    .wcwp-weather-widget.mobile-bar .widget-value {
        font-size: min(0.875rem, 3.5vw);
        color: var(--global-palette13);
        font-weight: 700;
        white-space: nowrap;
    }
}

/* Desktop/Tablet Box - Hidden on mobile */
.wcwp-weather-widget.desktop-box {
    display: none;
}

@media (min-width: 769px) {
    .wcwp-weather-widget.desktop-box {
        display: grid;
        background: #6aadb2;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        max-width: 400px;
    }
    .wcwp-weather-widget.desktop-box .widget-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        text-align: center;
    }
    .wcwp-weather-widget.desktop-box .widget-icon {
        display: block;
        width: 48px;
        height: auto;
        margin-bottom: 2px;
    }
    .wcwp-weather-widget.desktop-box .widget-label {
        font-size: 0.6875rem;
        color: rgba(255, 255, 255, 0.8);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    .wcwp-weather-widget.desktop-box .widget-value {
        font-size: 1.125rem;
        color: white;
        font-weight: 600;
    }
}

.widget-loading {
    opacity: 0.6;
    font-size: 0.75rem;
    color: #999;
    text-align: center;
}

.widget-error {
    color: #d32f2f;
    font-size: 0.6875rem;
    text-align: center;
}
