/*
 * Atalhos de clima e alertas da Defesa Civil no topo da página inicial
 * (template-parts/header-alerts-weather.php).
 */

.topo-widgets {
    position: absolute;
    top: 1rem;
    right: 15px;
    left: auto;
    width: auto;
    z-index: 20;
    display: flex;
    gap: .5rem;
    font-family: "Inter", sans-serif;
}

.topo-widgets__botao {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .85rem;
    font-size: .85rem;
    line-height: 1;
    color: #fff;
    background: rgba(0, 74, 37, .85);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
    backdrop-filter: blur(4px);
    cursor: pointer;
    transition: background-color .15s;
}

.topo-widgets__botao:not(.topo-widgets__alerta):hover,
.topo-widgets__botao:not(.topo-widgets__alerta)[aria-expanded="true"] {
    background: rgba(0, 74, 37, 1);
}

.topo-widgets__botao:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.topo-widgets__botao .uel-clima__icone,
.topo-widgets__icone {
    flex: 0 0 auto;
    width: 1.3rem;
    height: 1.3rem;
}

.topo-widgets__texto {
    opacity: .85;
}

/* A cor do atalho de alertas acompanha a gravidade */
.topo-widgets__alerta--sem-alerta   { background: rgba(46, 125, 50, .9); }
.topo-widgets__alerta--baixa        { background: rgba(30, 136, 229, .95); }
.topo-widgets__alerta--moderada     { background: #F2B705; color: #3A2C00; border-color: rgba(58, 44, 0, .35); }
.topo-widgets__alerta--alta         { background: rgba(230, 126, 34, .95); }
.topo-widgets__alerta--muito-alta   { background: rgba(192, 57, 43, .95); }
.topo-widgets__alerta--indisponivel { background: rgba(95, 95, 95, .9); }

.topo-widgets__alerta:hover,
.topo-widgets__alerta[aria-expanded="true"] {
    filter: brightness(.92);
}

.topo-widgets__painel {
    width: 360px;
    max-width: calc(100vw - 30px);
    margin-top: .5rem !important;
    background: transparent;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    border-radius: 12px;
}

.topo-widgets__painel .uel-clima,
.topo-widgets__painel .uel-defesa-civil {
    height: auto;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

@media (max-width: 575.98px) {
    .topo-widgets {
        top: .6rem;
        right: 10px;
    }

    .topo-widgets__texto {
        display: none;
    }
}
