/* ==================== SIDEBAR CSS OTIMIZADO ==================== */

/* ===== MENU E USUÁRIO ===== */
.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.notification-icon {
    margin-left: auto;
}

.notification-btn {
    position: relative;
    background: rgba(52, 152, 219, 0.1);
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.notification-btn i {
    font-size: 1em;
    color: #3498db;
    transition: color 0.3s ease;
}

.notification-btn:hover i {
    color: #2980b9;
}

.notification-badge {
    position: absolute;
    top: 1px;
    right: 1px;
    width: 14px;
    height: 14px;
    font-size: 0.6em;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #2c3e50;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse-gentle 2s ease-in-out infinite;
}

@keyframes pulse-gentle {
    0%, 100% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.2);}
    50% { transform: scale(1.05); box-shadow: 0 3px 6px rgba(231,76,60,0.3);}
}

.notification-btn.has-notification {
    animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes bounce-subtle {
    0%,20%,50%,80%,100% { transform: translateY(0); }
    40% { transform: translateY(-2px); }
    60% { transform: translateY(-1px); }
}

/* ===== SIDEBAR ===== */
.side-menu {
    z-index: 9999;
}

/* ==================== WIDGET DE CLIMA ==================== */
.weather-section {
    padding: 12px;
    margin: 10px;
    border-radius: 10px;
    color: #2c3e50;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    font-family: "Inter", sans-serif;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
    font-size: 0.9em;
}

/* ===== BACKGROUNDS POR CLIMA - CORES SUAVES DE CÉU ===== */
.weather-section.sunny { 
    background: linear-gradient(135deg, #E6F3FF 0%, #B3D9FF 100%); 
    color: #2c3e50; 
}
.weather-section.cloudy { 
    background: linear-gradient(135deg, #F0F8FF 0%, #D4E6F7 100%); 
    color: #2c3e50; 
}
.weather-section.rainy { 
    background: linear-gradient(135deg, #D4E6F7 0%, #A4C8E8 100%); 
    color: #2c3e50; 
}
.weather-section.stormy { 
    background: linear-gradient(135deg, #A4C8E8 0%, #7AA7D4 100%); 
    color: white; 
}
.weather-section.snowy { 
    background: linear-gradient(135deg, #F8FBFF 0%, #E6F3FF 100%); 
    color: #2c3e50; 
}
.weather-section.night { 
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%); 
    color: white; 
}
.weather-section.partly-cloudy { 
    background: linear-gradient(135deg, #E6F3FF 0%, #D4E6F7 100%); 
    color: #2c3e50; 
}
.weather-section.foggy { 
    background: linear-gradient(135deg, #F5F7FA 0%, #E4E7EB 100%); 
    color: #2c3e50; 
}
/* ===== ÍCONES DE CLIMA COM FONT AWESOME ===== */
.weather-icon {
    flex-shrink: 0;
    margin-left: 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ===== CORES NOS ÍCONES DE CLIMA ===== */
.weather-section.sunny .weather-icon i.fa-sun {
    animation: rotateSun 10s linear infinite;
    color: #FFD700; /* Amarelo dourado mais suave */
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.weather-section.night .weather-icon i.fa-moon {
    animation: moonGlow 4s ease-in-out infinite;
    color: #F0E68C; /* Amarelo claro suave */
    filter: drop-shadow(0 2px 4px rgba(240, 230, 140, 0.4));
}

.weather-section.partly-cloudy .weather-icon i.fa-cloud-sun {
    animation: floatCloud 6s ease-in-out infinite;
    color: #87CEEB; /* Azul céu */
    filter: drop-shadow(0 2px 4px rgba(135, 206, 235, 0.3));
}

/* Ícone misto: sol azul + nuvem cinza */
.weather-section.partly-cloudy .weather-icon i.fa-cloud-sun {
    position: relative;
    color: #a0aab5; /* Cinza suave para a nuvem */
}

.weather-section.partly-cloudy .weather-icon i.fa-cloud-sun::before {
    content: "\f185"; /* Código do sol em Font Awesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: -8px;
    top: -6px;
    color: #3b82f6; /* Azul mais vibrante para o sol */
    z-index: -1; /* Fica atrás da nuvem */
    animation: rotateSun 12s linear infinite;
    filter: drop-shadow(0 2px 3px rgba(59, 130, 246, 0.3));
}

.weather-section.night .weather-icon i.fa-cloud-moon {
    animation: floatCloud 6s ease-in-out infinite;
    color: #A9A9A9; /* Cinza escuro suave */
    filter: drop-shadow(0 2px 4px rgba(169, 169, 169, 0.3));
}

.weather-section.cloudy .weather-icon i.fa-cloud {
    animation: driftCloud 8s ease-in-out infinite;
    color: #778899; /* Cinza azulado */
    filter: drop-shadow(0 2px 4px rgba(119, 136, 153, 0.3));
}

.weather-section.rainy .weather-icon i.fa-cloud-rain,
.weather-section.rainy .weather-icon i.fa-cloud-showers-heavy {
    animation: rainFall 2s linear infinite;
    color: #4682B4; /* Azul aço */
    filter: drop-shadow(0 2px 4px rgba(70, 130, 180, 0.3));
}

.weather-section.stormy .weather-icon i.fa-bolt {
    animation: lightningFlash 4s ease-in-out infinite;
    color: #FFA500; /* Laranja */
    filter: drop-shadow(0 2px 4px rgba(255, 165, 0, 0.4));
}

.weather-section.snowy .weather-icon i.fa-snowflake {
    animation: snowFall 3s linear infinite;
    color: #B0E0E6; /* Azul pó */
    filter: drop-shadow(0 2px 4px rgba(176, 224, 230, 0.4));
}

.weather-section.foggy .weather-icon i.fa-smog {
    animation: fogMove 5s ease-in-out infinite;
    color: #696969; /* Cinza escuro médio */
    filter: drop-shadow(0 2px 4px rgba(105, 105, 105, 0.3));
}

/* ==================== ANIMAÇÕES ==================== */
@keyframes rotateSun { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

@keyframes moonGlow { 
    0%, 100% { 
        opacity: 0.8; 
        filter: drop-shadow(0 0 5px #F0E68C); 
    } 
    50% { 
        opacity: 1; 
        filter: drop-shadow(0 0 10px #F0E68C); 
    } 
}

@keyframes floatCloud { 
    0%, 100% { transform: translateY(0px); } 
    50% { transform: translateY(-2px); } 
}

@keyframes driftCloud { 
    0%, 100% { transform: translateX(0) translateY(0); } 
    50% { transform: translateX(-2px) translateY(-1px); } 
}

@keyframes rainFall { 
    0% { transform: translateY(-8px); opacity: 0; } 
    50% { opacity: 1; } 
    100% { transform: translateY(8px); opacity: 0; } 
}

@keyframes lightningFlash {
    0%, 85%, 100% { opacity: 0.3; }
    90%, 95% { opacity: 1; }
}

@keyframes snowFall { 
    0% { transform: translateY(-6px) rotate(0deg); opacity: 0; } 
    50% { opacity: 1; } 
    100% { transform: translateY(6px) rotate(180deg); opacity: 0; } 
}

@keyframes fogMove { 
    0%, 100% { opacity: 0.6; transform: translateX(-2px); } 
    50% { opacity: 0.8; transform: translateX(2px); } 
}

/* ===== CONTEÚDO ===== */
.weather-main { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 12px; 
    animation: fadeInUp 0.5s ease-out; 
}

.weather-temp-container {
    text-align: left; 
    flex: 1;
}

.weather-temp {
    font-size: 1.9em; 
    font-weight: 700; 
    margin-bottom: 2px; 
    line-height: 1;
}

.weather-feels-like {
    font-size: 11px; 
    opacity: 0.8; 
    margin-bottom: 2px;
}

.weather-desc {
    font-size: 13px; 
    font-weight: 600; 
    text-transform: capitalize;
}

.weather-details {
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 8px; 
    margin-top: 10px; 
    padding-top: 10px; 
    border-top: 1px solid rgba(255,255,255,0.3);
}

.weather-detail {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 3px; 
    padding: 6px; 
    border-radius: 8px; 
    background: rgba(255,255,255,0.15); 
    border: 1px solid rgba(255,255,255,0.1); 
    backdrop-filter: blur(4px); 
    transition: all 0.2s ease;
}

.weather-detail:hover {
    background: rgba(255,255,255,0.25); 
    transform: translateY(-1px);
}

.weather-detail i {
    font-size: 1em; 
    margin-bottom: 1px; 
    opacity: 0.9;
}

.weather-detail span {
    font-size: 10px; 
    font-weight: 600; 
    text-align: center; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
    width: 100%;
}

.weather-error {
    text-align: center; 
    padding: 15px;
}

.weather-error i {
    font-size: 1.3em; 
    margin-bottom: 4px; 
    opacity: 0.7;
}

.weather-error p {
    margin: 0; 
    font-size: 11px; 
    opacity: 0.8;
}

/* ===== CONTRASTE ===== */
.weather-section.sunny .weather-detail,
.weather-section.cloudy .weather-detail,
.weather-section.snowy .weather-detail,
.weather-section.partly-cloudy .weather-detail,
.weather-section.foggy .weather-detail {
    background: rgba(255,255,255,0.25); 
    color: #2c3e50; 
    border: 1px solid rgba(255,255,255,0.3);
}

.weather-section.rainy .weather-detail,
.weather-section.stormy .weather-detail,
.weather-section.night .weather-detail {
    background: rgba(255,255,255,0.15); 
    color: white; 
    border: 1px solid rgba(255,255,255,0.2);
}

.weather-section.sunny .weather-temp,
.weather-section.cloudy .weather-temp,
.weather-section.snowy .weather-temp,
.weather-section.partly-cloudy .weather-temp,
.weather-section.foggy .weather-temp {
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
}

.weather-section.rainy .weather-temp,
.weather-section.stormy .weather-temp,
.weather-section.night .weather-temp {
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* ===== ANIMAÇÕES SUAVES ===== */
@keyframes fadeInUp { 
    from { opacity: 0; transform: translateY(8px); } 
    to { opacity: 1; transform: translateY(0); } 
}

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* ===== RESPONSIVO ===== */
@media (max-width: 768px) {
    .weather-section {
        padding: 10px; 
        margin: 8px;
    }
    
    .weather-temp {
        font-size: 1.6em;
    }
    
    .weather-icon {
        width: 60px; 
        height: 60px; 
        margin-left: 2px;
        font-size: 2em;
    }
    
    .weather-details {
        gap: 6px;
    }
    
    .weather-detail {
        padding: 5px 3px;
    }
    
    .weather-detail span {
        font-size: 9px;
    }
}