/* WordPress Weather Plugin Styles */
.weather-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Graphic Weather Backgrounds */
.weather-bg-sunny {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%) !important;
}

.weather-bg-sunny::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 200, 0.8) 0%, rgba(255, 200, 100, 0.4) 50%, transparent 70%);
    border-radius: 50%;
    animation: sun-pulse 4s ease-in-out infinite;
}

@keyframes sun-pulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

.weather-bg-cloudy {
    background: linear-gradient(135deg, #89a4c7 0%, #6b8cae 100%) !important;
}

.weather-bg-cloudy::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100px;
    height: 40px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    box-shadow: 
        20px 20px 0 -10px rgba(255, 255, 255, 0.5),
        -20px 10px 0 -5px rgba(255, 255, 255, 0.4);
    animation: cloud-float 6s ease-in-out infinite;
}

@keyframes cloud-float {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

.weather-bg-rainy {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%) !important;
}

.weather-bg-rainy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    background-size: 2px 20px;
    animation: rain-fall 0.5s linear infinite;
    pointer-events: none;
}

@keyframes rain-fall {
    0% { background-position: 0 0; }
    100% { background-position: 10px 20px; }
}

.weather-bg-snowy {
    background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%) !important;
    color: #333 !important;
}

.weather-bg-snowy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.8) 2px, transparent 2px);
    background-size: 30px 30px;
    animation: snow-fall 3s linear infinite;
    pointer-events: none;
}

@keyframes snow-fall {
    0% { background-position: 0 0; }
    100% { background-position: 30px 30px; }
}

.weather-bg-stormy {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
}

.weather-bg-stormy::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0);
    animation: lightning 4s infinite;
    pointer-events: none;
}

@keyframes lightning {
    0%, 89%, 91%, 93%, 95%, 100% { background: rgba(255, 255, 255, 0); }
    90%, 92%, 94% { background: rgba(255, 255, 255, 0.3); }
}

.weather-bg-night {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%) !important;
}

.weather-bg-night::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #f5f5dc 0%, #fffacd 30%, transparent 70%);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 250, 205, 0.5);
    animation: moon-glow 3s ease-in-out infinite;
}

@keyframes moon-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 250, 205, 0.5); }
    50% { box-shadow: 0 0 30px rgba(255, 250, 205, 0.8); }
}

.weather-bg-night::after {
    content: '';
    position: absolute;
    top: 40px;
    right: 50px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transform: translateX(-10px);
}

.weather-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Simple Format */
.weather-simple {
    text-align: center;
    padding: 15px;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.weather-simple .weather-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.weather-simple .weather-temp {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.weather-simple .weather-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: capitalize;
}

/* Detailed Format */
.weather-detailed {
    color: white;
}

.weather-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-icon-large {
    font-size: 3.5rem;
    margin-right: 20px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

.weather-main {
    flex: 1;
}

.weather-main .weather-temp {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.weather-main .weather-desc {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    opacity: 0.95;
    text-transform: capitalize;
}

.weather-main .weather-feels {
    font-size: 0.9rem;
    opacity: 0.85;
    margin: 0;
}

.weather-details {
    margin-bottom: 15px;
}

.weather-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-row:last-child {
    border-bottom: none;
}

.weather-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

.weather-value {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

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

.weather-footer small {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Error State */
.weather-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

/* Dark Theme Variations */
@media (prefers-color-scheme: dark) {
    .weather-widget {
        background: linear-gradient(135deg, #434343 0%, #000000 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .weather-widget {
        margin: 10px;
        padding: 15px;
        max-width: none;
    }
    
    .weather-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .weather-icon-large {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .weather-main .weather-temp {
        font-size: 2.5rem;
    }
    
    .weather-row {
        padding: 6px 0;
    }
    
    .weather-label,
    .weather-value {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .weather-widget {
        margin: 5px;
        padding: 12px;
    }
    
    .weather-simple {
        min-height: 100px;
        padding: 12px;
    }
    
    .weather-simple .weather-icon {
        font-size: 2rem;
    }
    
    .weather-simple .weather-temp {
        font-size: 1.8rem;
    }
    
    .weather-icon-large {
        font-size: 3rem;
    }
    
    .weather-main .weather-temp {
        font-size: 2.2rem;
    }
    
    .weather-main .weather-desc {
        font-size: 1rem;
    }
}

/* Widget Area Styling */
.widget .weather-widget {
    margin-bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.widget-area .weather-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Alternative Color Themes */
.weather-widget.theme-sunny {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.weather-widget.theme-cloudy {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.weather-widget.theme-rainy {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.weather-widget.theme-snowy {
    background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%);
    color: #333;
}

.weather-widget.theme-snowy .weather-row,
.weather-widget.theme-snowy .weather-footer {
    border-color: rgba(0, 0, 0, 0.1);
}

.weather-widget.theme-snowy .weather-label,
.weather-widget.theme-snowy .weather-value,
.weather-widget.theme-snowy .weather-main .weather-temp,
.weather-widget.theme-snowy .weather-main .weather-desc,
.weather-widget.theme-snowy .weather-main .weather-feels {
    color: #333;
    text-shadow: none;
}

/* Loading State */
.weather-widget.loading {
    opacity: 0.7;
    pointer-events: none;
}

.weather-widget.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Accessibility */
.weather-widget:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .weather-widget {
        background: #000;
        border: 2px solid #fff;
    }
    
    .weather-widget .weather-temp,
    .weather-widget .weather-desc,
    .weather-widget .weather-label,
    .weather-widget .weather-value {
        color: #fff;
    }
}

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

/* Print Styles */
@media print {
    .weather-widget {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }
    
    .weather-widget .weather-temp,
    .weather-widget .weather-desc,
    .weather-widget .weather-label,
    .weather-widget .weather-value {
        color: black !important;
        text-shadow: none !important;
    }
}