/* styles/weather.css */
.weather-widget {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    /* Usando cores escuras para o tema padrão (dark-first) */
    /*background: rgba(255, 255, 255, 0.1);*/ 
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none !important; 
    box-shadow: none !important; 
    color: white !important; 
}

.weather-widget:hover {
    background: rgba(255, 255, 255, 0.2);
}

.weather-widget.error {
    opacity: 0.7;
}

.weather-icon {
    font-size: 1.5rem;
    color: white !important;
}

.weather-info {
    display: flex;
    flex-direction: column;
    color: white !important;
}

.weather-city {
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0.9;
    color: white !important;
}

.weather-temp {
    font-size: 1.1rem;
    font-weight: bold;
    color: white !important;
}

.weather-desc {
    font-size: 0.8rem;
    opacity: 0.8;
    text-transform: capitalize;
    color: white !important;
}

.weather-minmax {
    display: flex;
    gap: 5px;
    font-size: 0.7rem;
    align-items: center;
    color: white !important;
}

.weather-minmax .max { 
    color: #ffcc00 !important; /* Amarelo para máxima */
    font-weight: bold;
}

.weather-minmax .min { 
    color: #4fc3f7 !important; /* Azul claro para mínima */
    font-weight: bold;
}

.weather-minmax .separator {
    opacity: 0.6;
    color: white !important;
}

/* Garantir que todos os textos dentro do widget sejam brancos */
.weather-widget * {
    color: white !important;
}

/* Remover bordas de elementos filhos */
.weather-widget,
.weather-widget div,
.weather-widget span {
    border: none !important;
    outline: none !important;
}

/* Modo claro: sobrescrever cores do widget */
body.light-theme .weather-widget {
    background: rgba(31, 44, 86, 0.1);
    border-color: rgba(31, 44, 86, 0.2);
    color: var(--text-color-light); /* Usa a variável definida no HTML */
}

body.light-theme .weather-widget:hover {
    background: rgba(31, 44, 86, 0.2);
}

/* Garante que os filhos do widget sejam escuros no tema claro */
body.light-theme .weather-widget * {
    color: var(--text-color-light) !important;
}
body.light-theme .weather-widget .weather-icon {
    color: var(--primary-color-light) !important;
}

/* ---------------------------------------------------- */
/* Estilos Detalhados da Página (clima.html) */
/* ---------------------------------------------------- */

/* Removendo estilos de plano de fundo da página de clima.html (isso está no weather-hero) */
/* Removendo estilos de container e header que já estão no HTML/Bootstrap */

/* Estilos para cards de previsão de 5 dias */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem; /* Aumenta o gap para melhor espaçamento */
}

.forecast-day {
    /* Background e box-shadow virão do CSS embutido para compatibilidade de tema */
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.forecast-date {
    font-weight: 600;
    margin-bottom: 10px;
    color: inherit; /* Herda do body */
}

.forecast-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color-light); /* Padrão claro/Escuro */
    margin: 10px 0;
}

body:not(.light-theme) .forecast-icon i {
    color: var(--secondary-color-dark);
}

.forecast-minmax {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.forecast-minmax .max {
    color: #e74c3c;
    font-weight: 600;
}

.forecast-minmax .min {
    color: #3498db;
    font-weight: 600;
}

.forecast-desc {
    font-size: 0.9rem;
    color: inherit;
    text-transform: capitalize;
}

/* Detalhes do Clima (Vento, Umidade, etc.) */
.detail-item {
    /* Background e cores definidos no CSS embutido do HTML para temas */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.detail-item i {
    color: var(--primary-color-light); 
    font-size: 1.5rem;
}

body:not(.light-theme) .detail-item i {
    color: var(--primary-color-dark);
}


/* Responsividade */
@media (max-width: 768px) {
    .weather-widget {
        min-width: 120px;
        padding: 6px 10px;
    }
    
    .weather-temp {
        font-size: 1rem;
    }
    
    .current-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .weather-details {
        grid-template-columns: 1fr;
    }
    
    .forecast-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .weather-widget {
        min-width: auto;
        gap: 5px;
    }
    
    .weather-minmax {
        display: none;
    }
    
    .forecast-grid {
        grid-template-columns: 1fr;
    }
}

