/* Mapa de representantes */
.mapa-brasil {
    position: relative;
    z-index: 2;
    padding: clamp(2.25rem, 4.5vw, 3.75rem) 1rem;
    background-attachment: fixed;
    background-position: center;
}

.mapa-brasil-conteudo {
    max-width: 860px;
    margin: 0 auto;
}

.mapa-brasil-cabecalho {
    display: grid;
    max-width: 680px;
    margin-bottom: clamp(1rem, 2.4vw, 1.5rem);
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.mapa-brasil-etiqueta {
    display: inline-block;
    margin-bottom: 0.4rem;
    color: var(--amarelo);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mapa-brasil-cabecalho h2 {
    margin: 0;
    color: var(--azul);
    font-size: clamp(1.9rem, 4.5vw, 3.35rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
}

.mapa-brasil-cabecalho p {
    max-width: 620px;
    margin: 0.6rem 0 0;
    color: var(--texto-suave);
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.5;
}

.mapa-brasil-palco {
    position: relative;
    display: grid;
    width: min(100%, 780px);
    min-height: 410px;
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.25rem);
    overflow: hidden;
    border: 1px solid rgba(16, 0, 100, 0.12);
    border-radius: 30px 10px;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 192, 0, 0.16), transparent 38%),
        radial-gradient(circle at 84% 82%, rgba(16, 0, 100, 0.1), transparent 46%),
        linear-gradient(145deg, #fffdf7 0%, var(--branco) 48%, #f4f1ff 100%);
    box-shadow: 0 28px 70px rgba(16, 0, 100, 0.16);
    place-items: center;
}

.mapa-brasil-tooltip {
    position: absolute;
    z-index: 3;
    top: 0.75rem;
    left: 50%;
    max-width: calc(100% - 2rem);
    padding: 0.6rem 0.85rem;
    border-bottom: 3px solid var(--amarelo);
    border-radius: 10px;
    opacity: 0;
    color: var(--azul);
    background: var(--branco);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
    font-size: 0.92rem;
    font-weight: 900;
    text-align: center;
    transform: translate(-50%, -7px);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

.mapa-brasil-tooltip.visivel {
    opacity: 1;
    transform: translate(-50%, 0);
}

.mapa-brasil svg {
    display: block;
    width: min(100%, 420px);
    height: auto;
    margin: 0.75rem auto 0;
    overflow: visible;
    filter: drop-shadow(0 18px 22px rgba(16, 0, 100, 0.16));
}

.mapa-brasil [data-state] {
    outline: none;
}

.mapa-brasil [data-state] path {
    fill: rgba(16, 0, 100, 0.06);
    stroke: rgba(16, 0, 100, 0.24);
    stroke-width: 0.8;
    transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease;
    vector-effect: non-scaling-stroke;
}

.mapa-brasil [data-state] circle {
    fill: rgba(16, 0, 100, 0.08);
    stroke: rgba(16, 0, 100, 0.28);
    stroke-width: 0.7;
    transition: fill 180ms ease, stroke 180ms ease;
}

.mapa-brasil [data-state] text {
    fill: rgba(16, 0, 100, 0.52);
    font-size: 10px;
    font-weight: 800;
    pointer-events: none;
    transition: fill 180ms ease;
}

.mapa-brasil [data-state].atendido {
    cursor: pointer;
}

.mapa-brasil [data-state].atendido path {
    fill: var(--azul);
    stroke: rgba(255, 192, 0, 0.68);
}

.mapa-brasil [data-state].atendido circle {
    fill: var(--azul);
    stroke: rgba(255, 192, 0, 0.82);
}

.mapa-brasil [data-state].atendido text {
    fill: var(--branco);
}

.mapa-brasil [data-state].atendido:is(:hover, :focus, .selecionado) :is(path, circle) {
    fill: var(--amarelo);
    stroke: var(--azul);
}

.mapa-brasil [data-state].atendido:is(:hover, :focus, .selecionado) path {
    stroke-width: 1.5;
    filter: drop-shadow(0 0 7px rgba(255, 192, 0, 0.56));
}

.mapa-brasil [data-state].atendido:is(:hover, :focus, .selecionado) text {
    fill: var(--azul-escuro);
}

.mapa-brasil [data-state].nao-atendido {
    opacity: 0.5;
    pointer-events: none;
}

.mapa-brasil-legenda {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(16, 0, 100, 0.12);
    border-radius: 999px;
    color: var(--azul);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 8px 24px rgba(16, 0, 100, 0.1);
    font-size: 0.76rem;
    font-weight: 700;
    gap: 0.45rem;
}

.mapa-brasil-legenda i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--azul);
    box-shadow: 0 0 0 2px rgba(255, 192, 0, 0.52);
}

@media (max-width: 575.98px) {
    .mapa-brasil {
        padding: 2.25rem 0.75rem;
    }

    .mapa-brasil-cabecalho {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .mapa-brasil-cabecalho h2 {
        font-size: clamp(1.9rem, 10vw, 2.7rem);
    }

    .mapa-brasil-palco {
        min-height: 380px;
        padding: 0.75rem;
        border-radius: 22px 8px;
    }

    .mapa-brasil svg {
        width: min(100%, 330px);
        margin-top: 1.25rem;
        filter: none;
        shape-rendering: geometricPrecision;
        text-rendering: geometricPrecision;
    }

    .mapa-brasil [data-state] path {
        stroke-width: 1.1;
    }

    .mapa-brasil [data-state] circle {
        stroke-width: 1;
    }

    .mapa-brasil [data-state] text {
        stroke: rgba(8, 0, 47, 0.82);
        stroke-width: 0.8px;
        font-size: 12px;
        paint-order: stroke fill;
    }

    .mapa-brasil-legenda {
        right: 0.75rem;
        bottom: 0.75rem;
    }
}
