/* ===== WIDGET DEL CLIMA CON COLORES ===== */

.weather-widget {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 16px;
    border-radius: 12px;
    min-width: 280px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    color: white;
    position: relative;
    overflow: hidden;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.weather-main i {
    font-size: 1.4rem;
    color: #ffd700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

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

.weather-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
}

.weather-forecast {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.forecast-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 8px;
    min-width: 40px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.day-name {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.forecast-day i {
    font-size: 0.9rem;
    color: #ffd700;
    margin: 3px 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.day-temp {
    font-weight: 700;
    color: white;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Variaciones de color según el clima */
.weather-widget.sunny {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6b6b 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 154, 86, 0.4) !important;
}

.weather-widget.sunny .weather-main i {
    color: #ffd700 !important;
    animation: sunnyGlow 2s ease-in-out infinite alternate;
}

.weather-widget.cloudy {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%) !important;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4) !important;
}

.weather-widget.cloudy .weather-main i {
    color: #ddd !important;
    animation: cloudyFloat 3s ease-in-out infinite;
}

.weather-widget.rainy {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%) !important;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4) !important;
}

.weather-widget.rainy .weather-main i {
    color: #74b9ff !important;
    animation: rainDrop 1.5s ease-in-out infinite;
}

.weather-widget.night {
    background: linear-gradient(135deg, #2d3436 0%, #636e72 100%) !important;
    box-shadow: 0 4px 15px rgba(45, 52, 54, 0.4) !important;
}

.weather-widget.night .weather-main i {
    color: #ffd700 !important;
    animation: starTwinkle 2s ease-in-out infinite;
}

/* Animaciones del clima */
@keyframes sunnyGlow {
    0% { text-shadow: 0 2px 4px rgba(255, 215, 0, 0.5); }
    100% { text-shadow: 0 2px 8px rgba(255, 215, 0, 0.8); }
}

@keyframes cloudyFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-2px); }
}

@keyframes rainDrop {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(1px); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Botón de actualización del clima */
.weather-refresh-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 10px;
    transition: all 0.3s ease;
    margin-left: 8px;
    position: relative;
    z-index: 2;
}

.weather-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

.weather-refresh-btn:active {
    transform: scale(0.95);
}

.weather-refresh-btn i {
    font-size: 10px;
}

/* Animación de rotación al actualizar */
.weather-refresh-btn.updating i {
    animation: spin 1s linear infinite;
}

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

.weather-widget.snowy {
    background: linear-gradient(135deg, #ddd6fe 0%, #a78bfa 100%);
}

/* Responsive para el clima */
@media (max-width: 768px) {
    .weather-widget {
        min-width: 220px;
        padding: 10px 12px;
        gap: 12px;
    }
    
    .weather-main {
        font-size: 0.9rem;
    }
    
    .weather-main i {
        font-size: 1.2rem;
    }
    
    .weather-temp {
        font-size: 1rem;
    }
    
    .weather-desc {
        font-size: 0.8rem;
    }
    
    .forecast-day {
        padding: 4px 6px;
        min-width: 35px;
        font-size: 0.7rem;
    }
    
    .day-name {
        font-size: 0.65rem;
    }
    
    .forecast-day i {
        font-size: 0.8rem;
    }
    
    .day-temp {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .weather-widget {
        min-width: 200px;
        padding: 8px 10px;
        gap: 10px;
    }
    
    .weather-main {
        font-size: 0.85rem;
    }
    
    .weather-main i {
        font-size: 1.1rem;
    }
    
    .weather-temp {
        font-size: 0.95rem;
    }
    
    .weather-desc {
        font-size: 0.75rem;
    }
    
    .forecast-day {
        padding: 3px 5px;
        min-width: 30px;
        font-size: 0.65rem;
    }
    
    .day-name {
        font-size: 0.6rem;
    }
    
    .forecast-day i {
        font-size: 0.75rem;
    }
    
    .day-temp {
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .weather-widget {
        min-width: 180px;
        padding: 6px 8px;
        gap: 8px;
    }
    
    .weather-main {
        font-size: 0.8rem;
    }
    
    .weather-main i {
        font-size: 1rem;
    }
    
    .weather-temp {
        font-size: 0.9rem;
    }
    
    .weather-desc {
        font-size: 0.7rem;
    }
    
    .forecast-day {
        padding: 2px 4px;
        min-width: 25px;
        font-size: 0.6rem;
    }
    
    .day-name {
        font-size: 0.55rem;
    }
    
    .forecast-day i {
        font-size: 0.7rem;
    }
    
    .day-temp {
        font-size: 0.6rem;
    }
}
