/* ══════════════════════════════════════════
   mapa.css — mapa de representantes (página Representantes)
   Escopado em #app: não altera html/body nem o resto da página.
   ══════════════════════════════════════════ */

#app {
    --sd: #254732;          /* estado disponível */
    --sh: #479552;          /* estado sob o mouse */
    --sa: #f9c23c;          /* estado selecionado */
    --ss: rgba(255, 255, 255, .55);
    --ssh: #ffffff;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    min-height: 660px;
    overflow: hidden;
    border-radius: var(--r-lg, 28px);
    background: var(--mint-50, #f4f8f1);
    box-shadow: var(--shadow-md);
}

#app *,
#app *::before,
#app *::after {
    box-sizing: border-box;
}

#map-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 1rem + 2vw, 3rem);
}

#map-wrap {
    position: relative;
    width: min(540px, 100%);
}

#brazil-svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 18px 30px rgba(15, 33, 23, .22));
}

#app text {
    font-size: 10px;
}

.st {
    fill: var(--sd);
    stroke: var(--ss);
    stroke-width: .55;
    cursor: pointer;
    transition: fill .2s, stroke .2s, stroke-width .2s;
}

.st:hover {
    fill: var(--sh);
    stroke: var(--ssh);
    stroke-width: .9;
}

.st.on {
    fill: var(--sa);
    stroke: #fff;
    stroke-width: 1.2;
}

.lbl {
    fill: rgba(255, 255, 255, .85);
    font-family: var(--font, 'Montserrat', sans-serif);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: .04em;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
}

.st.on ~ .lbl,
.lbl.on {
    fill: var(--forest-950, #0f2117);
}

#leg {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}

.li {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--muted, #57645b);
    font-size: .8125rem;
    font-weight: 500;
}

.ld {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* ── painel ── */
#panel {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--forest-800, #1c3626);
    color: var(--on-dark, #f1f6ee);
}

#pbrand {
    padding: 1.75rem 1.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

#pbrand .ey {
    display: inline-flex;
    margin-bottom: .75rem;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: var(--yellow-400, #f9c23c);
    font-size: .8125rem;
    font-weight: 600;
}

#pbrand h1 {
    margin: 0;
    color: #fff;
    font-size: 1.625rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.02em;
    text-wrap: balance;
}

/* a quebra fixa do texto original deixava "Agro" sozinho na linha */
#pbrand h1 br {
    display: none;
}

#pbrand p {
    margin: .6rem 0 0;
    color: var(--on-dark-muted, #b8c9bc);
    font-size: .9375rem;
    line-height: 1.55;
}

#ev {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .9rem;
    padding: 2rem;
    text-align: center;
}

#ev .ico {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--yellow-400, #f9c23c);
}

#ev .ico svg {
    stroke: var(--forest-950, #0f2117);
}

#ev h2 {
    margin: 0;
    color: #fff;
    font-size: 1.125rem;
    font-weight: 600;
}

#ev p {
    max-width: 240px;
    margin: 0;
    color: var(--on-dark-muted, #b8c9bc);
    font-size: .9375rem;
    line-height: 1.55;
}

#ec {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

#eh {
    position: relative;
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.rtag {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .5rem;
    color: var(--yellow-400, #f9c23c);
    font-size: .8125rem;
    font-weight: 600;
}

.rtag::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

#eh h2 {
    margin: 0;
    color: #fff;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: .75rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: var(--on-dark, #f1f6ee);
    font-size: .8125rem;
    font-weight: 500;
}

#bv {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
}

#bv:hover {
    border-color: var(--yellow-400, #f9c23c);
    background: var(--yellow-400, #f9c23c);
    color: var(--forest-950, #0f2117);
}

#bv .icon {
    width: 18px;
    height: 18px;
}

#rl {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem 1.25rem;
    scrollbar-color: rgba(255, 255, 255, .25) transparent;
    scrollbar-width: thin;
}

.rc {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: .6rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
    opacity: 0;
    animation: si .35s cubic-bezier(.16, 1, .3, 1) forwards;
    transition: background-color .2s, border-color .2s;
}

.rc:hover {
    border-color: rgba(249, 194, 60, .5);
    background: rgba(255, 255, 255, .08);
}

@keyframes si {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.av {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--yellow-400, #f9c23c);
    color: var(--forest-950, #0f2117);
    font-size: .8125rem;
    font-weight: 700;
}

.ri {
    flex: 1;
    min-width: 0;
}

.rn {
    margin-bottom: .1rem;
    overflow: hidden;
    color: #fff;
    font-size: .9375rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rc2 {
    margin-bottom: .2rem;
    color: var(--on-dark-muted, #b8c9bc);
    font-size: .8125rem;
}

.rt {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--yellow-400, #f9c23c);
    font-size: .8125rem;
    font-weight: 600;
}

.rt svg {
    width: 14px;
    height: 14px;
}

.rt a {
    color: inherit;
    text-decoration: none;
}

.rt a:hover {
    text-decoration: underline;
}

#sb {
    display: flex;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sv {
    flex: 1;
    padding: 0 .5rem;
    text-align: center;
}

.sv:not(:last-child) {
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.svv {
    color: var(--yellow-400, #f9c23c);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.svl {
    margin-top: .3rem;
    color: var(--on-dark-muted, #b8c9bc);
    font-size: .8125rem;
}

#tip {
    position: fixed;
    z-index: 9999;
    display: none;
    padding: .35rem .75rem;
    border-radius: 10px;
    background: var(--forest-950, #0f2117);
    color: #fff;
    font-family: var(--font, 'Montserrat', sans-serif);
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5);
}

@media (max-width: 991.98px) {
    #app {
        grid-template-columns: minmax(0, 1fr);
        min-height: 0;
    }

    #map-area {
        padding-bottom: 4rem;
    }

    #map-wrap {
        width: min(460px, 100%);
    }

    #ec {
        min-height: 320px;
    }

    #rl {
        max-height: 420px;
    }
}
