/* Fresh Weather Popup System - Unique Design Implementation */
/* Inherits color variables from .dark theme in theme4.css */

/* Unique CSS Variables for Weather Popup */
:root {
    --jl-weather-popup-bg: var(--bg-secondary);
    --jl-weather-popup-border: var(--border);
    --jl-weather-popup-shadow: rgba(0, 0, 0, 0.1);
    --jl-weather-popup-text-primary: var(--text-primary);
    --jl-weather-popup-text-secondary: var(--text-secondary);
    --jl-weather-popup-primary: var(--primary);
    --jl-weather-popup-accent: var(--accent);
    --jl-weather-popup-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --jl-weather-popup-border-radius: 8px;
    --jl-weather-popup-padding: 20px;
}

/* Weather Popup Location Section */
.weather-popup-location {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--jl-weather-popup-bg);
    border-radius: var(--jl-weather-popup-border-radius);
    border: 1px solid var(--jl-weather-popup-border);
}

.weather-popup-location .season-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--jl-weather-popup-primary);
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.weather-popup-location p {
    margin: 0;
    color: var(--jl-weather-popup-text-secondary);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Weather Popup Main Section */
.weather-popup-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--jl-weather-popup-bg);
    border-radius: var(--jl-weather-popup-border-radius);
    border: 1px solid var(--jl-weather-popup-border);
}

.weather-popup-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--jl-weather-popup-primary), var(--jl-weather-popup-accent));
    border-radius: 50%;
    box-shadow: 0 4px 15px var(--jl-weather-popup-shadow);
}

.weather-popup-temp {
    text-align: left;
}

.temp-main {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--jl-weather-popup-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.temp-feels {
    font-size: 0.9rem;
    color: var(--jl-weather-popup-text-secondary);
    margin-bottom: 0.5rem;
}

.temp-desc {
    font-size: 1rem;
    color: var(--jl-weather-popup-text-primary);
    font-weight: 500;
    text-transform: capitalize;
}

/* Weather Popup Details Section */
.weather-popup-details {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--jl-weather-popup-bg);
    border-radius: var(--jl-weather-popup-border-radius);
    border: 1px solid var(--jl-weather-popup-border);
}

.weather-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border-left: 3px solid var(--jl-weather-popup-primary);
    margin-bottom: 0.5rem;
    transition: var(--jl-weather-popup-transition);
}

.weather-detail-item:last-child {
    margin-bottom: 0;
}

.weather-detail-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.detail-label {
    font-size: 0.9rem;
    color: var(--jl-weather-popup-text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 0.9rem;
    color: var(--jl-weather-popup-text-primary);
    font-weight: 600;
}

/* Weather Forecast Section */
.weather-forecast {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--jl-weather-popup-bg);
    border-radius: var(--jl-weather-popup-border-radius);
    border: 1px solid var(--jl-weather-popup-border);
}

.weather-forecast h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--jl-weather-popup-primary);
    text-align: center;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
}

.forecast-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 193, 7, 0.2);
    transition: var(--jl-weather-popup-transition);
}

.forecast-item:hover {
    background: rgba(255, 193, 7, 0.15);
    transform: translateY(-2px);
}

.forecast-day {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--jl-weather-popup-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.forecast-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.forecast-temp {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.temp-max {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--jl-weather-popup-primary);
}

.temp-min {
    font-size: 0.8rem;
    color: var(--jl-weather-popup-text-secondary);
}

.forecast-desc {
    font-size: 0.8rem;
    color: var(--jl-weather-popup-text-secondary);
    text-transform: capitalize;
}

/* Weather Popup Footer */
.weather-popup-footer {
    text-align: center;
    padding: 1rem;
    background: var(--jl-weather-popup-bg);
    border-radius: var(--jl-weather-popup-border-radius);
    border: 1px solid var(--jl-weather-popup-border);
}

.weather-popup-footer small {
    font-size: 0.8rem;
    color: var(--jl-weather-popup-text-secondary);
    font-style: italic;
}

/* Weather Popup Error State */
.weather-popup-error {
    text-align: center;
    padding: 2rem;
    background: var(--jl-weather-popup-bg);
    border-radius: var(--jl-weather-popup-border-radius);
    border: 1px solid var(--jl-weather-popup-border);
}

.weather-popup-error p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: #ff6b6b;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .weather-popup-main {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .weather-popup-icon {
        width: 60px;
        height: 60px;
    }
    
    .temp-main {
        font-size: 2rem;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .forecast-item {
        padding: 0.75rem;
    }
    
    .forecast-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .weather-popup-main {
        padding: 1rem;
    }
    
    .weather-popup-icon {
        width: 50px;
        height: 50px;
    }
    
    .temp-main {
        font-size: 1.8rem;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .weather-detail-item {
        padding: 0.5rem;
    }
    
    .detail-label,
    .detail-value {
        font-size: 0.8rem;
    }
}

/* Animation Keyframes */
@keyframes jl-weather-popup-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.weather-popup-location,
.weather-popup-main,
.weather-popup-details,
.weather-forecast,
.weather-popup-footer {
    animation: jl-weather-popup-fadeIn 0.6s ease-out;
}

/* Staggered Animation for Weather Elements */
.weather-popup-location { animation-delay: 0.1s; }
.weather-popup-main { animation-delay: 0.2s; }
.weather-popup-details { animation-delay: 0.3s; }
.weather-forecast { animation-delay: 0.4s; }
.weather-popup-footer { animation-delay: 0.5s; }

/* Focus States for Accessibility */
.weather-detail-item:focus,
.forecast-item:focus {
    outline: 2px solid var(--jl-weather-popup-primary);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .weather-detail-item {
        border-left-width: 4px;
    }
    
    .forecast-item {
        border-width: 2px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .weather-popup-location,
    .weather-popup-main,
    .weather-popup-details,
    .weather-forecast,
    .weather-popup-footer,
    .weather-detail-item,
    .forecast-item {
        animation: none;
        transition: none;
    }
    
    .weather-detail-item:hover,
    .forecast-item:hover {
        transform: none;
    }
}




