/* Lake Eufaula Weather Plugin CSS */

/* Container and Layout */
.lew-weather-container {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.lew-weather-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="clouds" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="20" cy="20" r="10" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="15" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23clouds)"/></svg>') repeat;
    opacity: 0.3;
    pointer-events: none;
}

.lew-weather-container * {
    position: relative;
    z-index: 1;
}

/* Header Section */
.lew-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 15px;
}

.lew-location {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lew-updated {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
    font-weight: 300;
}

/* Refresh Button */
.lew-refresh-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lew-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lew-refresh-btn.lew-spinning {
    animation: lew-spin 1s linear infinite;
}

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

/* Loading State */
.lew-loading {
    text-align: center;
    padding: 40px 20px;
    font-size: 16px;
    opacity: 0.8;
}

/* Current Weather Section */
.lew-current-weather {
    margin-bottom: 30px;
}

.lew-current-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.lew-temperature {
    font-size: 4rem;
    font-weight: 300;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.lew-weather-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.lew-weather-icon img {
    width: 80px;
    height: 80px;
    margin-bottom: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.lew-description {
    font-size: 16px;
    font-weight: 500;
    text-transform: capitalize;
}

/* Current Weather Details */
.lew-current-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lew-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.lew-detail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: background 0.3s ease;
}

.lew-detail-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lew-detail-label {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lew-detail-value {
    font-size: 16px;
    font-weight: 600;
}

/* Forecast Section */
.lew-forecast {
    margin-top: 30px;
}

.lew-forecast h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lew-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.lew-forecast-day {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.lew-forecast-day:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.lew-forecast-date {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.9;
}

.lew-forecast-icon {
    margin-bottom: 10px;
}

.lew-forecast-icon img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.lew-forecast-temps {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}

.lew-temp-high {
    font-size: 18px;
    font-weight: 600;
}

.lew-temp-low {
    font-size: 16px;
    opacity: 0.7;
}

.lew-forecast-desc {
    font-size: 12px;
    margin-bottom: 10px;
    opacity: 0.8;
    text-transform: capitalize;
}

.lew-forecast-details {
    font-size: 11px;
    opacity: 0.7;
    line-height: 1.3;
}

/* Weather Alerts */
.lew-alerts {
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lew-alerts h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lew-alerts h4::before {
    content: '⚠️';
    font-size: 18px;
}

.lew-alert {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.lew-alert:last-child {
    margin-bottom: 0;
}

.lew-alert-title {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.lew-alert-description {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 5px;
    opacity: 0.9;
}

.lew-alert-time {
    font-size: 11px;
    opacity: 0.7;
}

/* Error States */
.lew-error {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #fff;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lew-weather-container {
        padding: 15px;
        margin: 15px 0;
    }
    
    .lew-current-main {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .lew-temperature {
        font-size: 3rem;
    }
    
    .lew-detail-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }
    
    .lew-forecast-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }
    
    .lew-location {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .lew-weather-container {
        padding: 12px;
    }
    
    .lew-temperature {
        font-size: 2.5rem;
    }
    
    .lew-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lew-forecast-grid {
        grid-template-columns: 1fr;
    }
    
    .lew-weather-icon img {
        width: 60px;
        height: 60px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .lew-weather-container {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
}

/* Print Styles */
@media print {
    .lew-weather-container {
        background: white !important;
        color: black !important;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .lew-refresh-btn {
        display: none;
    }
    
    .lew-weather-container::before {
        display: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .lew-weather-container {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .lew-current-details,
    .lew-forecast-day,
    .lew-alerts {
        background: rgba(255, 255, 255, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.5);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .lew-refresh-btn,
    .lew-forecast-day {
        transition: none;
    }
    
    .lew-refresh-btn.lew-spinning {
        animation: none;
    }
}

/* Focus States for Accessibility */
.lew-refresh-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Animation for data updates */
.lew-weather-container.updating {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.lew-weather-container.updated {
    animation: lew-pulse 0.5s ease;
}

@keyframes lew-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}