/**
 * Weather Widget CSS
 * Styles for weather integration components
 * VERSION: v1.0 - 2025-01-17
 */

/* Weather Widget Container */
.weather-widget {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4, #10b981);
}

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

/* Weather Header */
.weather-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.weather-header i {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.weather-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 1.1rem;
}

.weather-location {
    margin-left: auto;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Current Weather */
.weather-current {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.weather-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 50%;
    padding: 8px;
}

.weather-icon-large {
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 50%;
    margin-right: 1rem;
}

.weather-icon-small {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    border-radius: 50%;
}

.weather-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 1rem;
}

.weather-loading i {
    font-size: 1.2rem;
    animation: spin 1s linear infinite;
}

.weather-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-warning);
    font-size: 0.9rem;
    padding: 1rem;
}

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

.weather-temp {
    display: flex;
    flex-direction: column;
}

.temp-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.temp-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: capitalize;
}

/* Weather Details Grid */
.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 0.85rem;
}

.weather-detail i {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Tomorrow's Weather */
.weather-tomorrow {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(6, 182, 212, 0.05));
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.tomorrow-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-color);
}

.tomorrow-header i {
    color: var(--primary-color);
}

.tomorrow-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.weather-icon-small {
    width: 32px;
    height: 32px;
}

.tomorrow-temp {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.tomorrow-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: capitalize;
}

.rain-chance {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Weather Recommendations */
.weather-recommendations {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.weather-recommendation {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.9rem;
    border-left: 4px solid;
}

.weather-recommendation.good {
    background: rgba(16, 185, 129, 0.1);
    border-left-color: #10b981;
    color: #059669;
}

.weather-recommendation.warning {
    background: rgba(245, 158, 11, 0.1);
    border-left-color: #f59e0b;
    color: #d97706;
}

.weather-recommendation.info {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3b82f6;
    color: #2563eb;
}

.rec-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.rec-message {
    flex: 1;
}

/* Weather Footer */
.weather-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    margin-top: 1rem;
}

.weather-updated {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .weather-widget {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .weather-main {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .tomorrow-preview {
        justify-content: center;
    }
    
    .temp-value {
        font-size: 1.75rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .weather-widget {
        background: #1f2937;
        border-color: #374151;
    }
    
    .weather-detail {
        background: #111827;
    }
    
    .weather-tomorrow {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    }
}

/* Map Weather Overlay (smaller version) */
.map-weather-overlay {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 280px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.map-weather-overlay .weather-widget {
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.map-weather-overlay .weather-widget::before {
    display: none;
}

/* Weather Loading State */
.weather-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-muted);
}

.weather-loading i {
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

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

/* Weather Error State */
.weather-error {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    margin: 1rem 0;
}

.weather-error i {
    margin-right: 0.5rem;
} 