/*
|--------------------------------------------------------------------------
| FILIADAS — UX E NAVEGAÇÃO
|--------------------------------------------------------------------------
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --amb-blue: #013963;
    --amb-blue-dark: #012a49;
    --amb-blue-light: #1977b8;
    --amb-teal: #008b8b;
    --amb-surface: #f1f1f1;
    --amb-map-fill: #c4d9ed;
    --amb-map-hover: #5a97c7;
    --amb-map-active: #013963;
    --amb-font: 'Poppins', sans-serif;
}

/*
|--------------------------------------------------------------------------
| Abas Federadas / Sociedades
|--------------------------------------------------------------------------
*/

.amb-filiadas-tab {
    display: flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    background: #eeeeee;
    color: #555f6b;
    font-family: var(--amb-font);
    font-size: 16px;
    font-weight: 400;
    text-align: center;
    cursor: pointer;
    transition:
        transform 180ms ease,
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.amb-filiadas-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(1, 57, 99, 0.22);
    background: #e3edf4;
    color: var(--amb-blue);
    box-shadow: 0 7px 20px rgba(1, 57, 99, 0.08);
}

.amb-filiadas-tab[aria-selected="true"] {
    border-color: var(--amb-blue);
    background: var(--amb-blue);
    color: #ffffff;
    box-shadow: 0 8px 22px rgba(1, 57, 99, 0.2);
}

.amb-filiadas-tab[aria-selected="true"]:hover {
    background: var(--amb-blue-dark);
    color: #ffffff;
}

.amb-filiadas-tab:focus-visible {
    outline: 3px solid rgba(25, 119, 184, 0.3);
    outline-offset: 3px;
}

.amb-filiadas-tab-panel[hidden] {
    display: none !important;
}

.amb-filiadas-tab-panel:not([hidden]) {
    animation: ambFiliadasPanelIn 220ms ease both;
}

.amb-filiadas-institutional-text {
    color: #767676;
    font-family: var(--amb-font);
    font-size: 0.94rem;
    line-height: 1.75;
}

/*
|--------------------------------------------------------------------------
| Menu lateral
|--------------------------------------------------------------------------
*/

.amb-filiadas-sidebar-link {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: var(--amb-surface);
    color: var(--amb-blue);
    font-size: 0.875rem;
    font-weight: 800;
    text-align: center;
    transition:
        transform 180ms ease,
        color 180ms ease,
        background-color 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.amb-filiadas-sidebar-link__icon {
    width: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-5px);
    transition:
        width 180ms ease,
        opacity 180ms ease,
        transform 180ms ease;
}

.amb-filiadas-sidebar-link:hover {
    transform: translateY(-1px);
    border-color: rgba(1, 57, 99, 0.22);
    background: #e4eef5;
    color: var(--amb-blue);
    box-shadow: 0 8px 22px rgba(1, 57, 99, 0.08);
}

.amb-filiadas-sidebar-link[data-active="true"] {
    transform: translateX(3px);
    border-color: var(--amb-blue);
    background: var(--amb-blue);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(1, 57, 99, 0.16);
}

.amb-filiadas-sidebar-link:hover .amb-filiadas-sidebar-link__icon,
.amb-filiadas-sidebar-link[data-active="true"]
    .amb-filiadas-sidebar-link__icon {
    width: 0.75rem;
    opacity: 1;
    transform: translateX(0);
}

.amb-filiadas-sidebar-link:focus-visible {
    outline: 3px solid rgba(25, 119, 184, 0.3);
    outline-offset: 3px;
}

/*
|--------------------------------------------------------------------------
| Mapa amCharts
|--------------------------------------------------------------------------
*/

.amb-federadas-map-shell {
    overflow: hidden;
    border: 1px solid #d4e2ef;
    border-radius: 16px;
    background: #eef4fb;
}

.amb-federadas-map {
    width: 100%;
    height: 465px;
}

.amb-federadas-map[aria-busy="true"]::before {
    content: "Carregando mapa...";
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #7890a5;
    font-size: 0.85rem;
    font-weight: 600;
}

.amb-federadas-map-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    padding: 0.8rem 1rem;
    color: #334155;
    font-size: 0.875rem;
}

.amb-federadas-map-select:focus {
    border-color: var(--amb-blue-light);
    outline: 3px solid rgba(25, 119, 184, 0.18);
}

/*
|--------------------------------------------------------------------------
| Painel de contato
|--------------------------------------------------------------------------
*/

.amb-federada-contact-panel {
    min-height: 175px;
}

.amb-federada-contact-panel__empty {
    display: flex;
    min-height: 175px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #c8dcef;
    border-radius: 16px;
    background: #ffffff;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.amb-federada-contact-panel__empty > i {
    color: #acd1ed;
    font-size: 2rem;
}

.amb-federada-contact-panel__empty > p {
    max-width: 18rem;
    margin-top: 0.75rem;
    color: #9aa9b7;
    font-size: 0.75rem;
    line-height: 1.65;
}

.amb-federada-contact-card {
    overflow: hidden;
    border: 1px solid #d7e3ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(1, 57, 99, 0.1);
    animation: ambContactCardIn 220ms ease both;
}

.amb-federada-contact-card[hidden] {
    display: none !important;
}

.amb-federada-contact-card__header {
    position: relative;
    display: flex;
    min-height: 126px;
    align-items: flex-start;
    justify-content: space-between;
    overflow: hidden;
    padding: 1.35rem 1.25rem;
    background:
        linear-gradient(
            135deg,
            #065990 0%,
            #1879bc 100%
        );
    color: #ffffff;
}

.amb-federada-contact-card__header h2 {
    margin-top: 0.55rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.amb-federada-contact-card__header p {
    position: relative;
    z-index: 1;
    margin-top: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.45;
    opacity: 0.9;
}

.amb-federada-contact-card__uf {
    display: inline-flex;
    min-width: 2rem;
    min-height: 1.2rem;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0.15rem 0.45rem;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.65rem;
    font-weight: 700;
}

.amb-federada-contact-card__watermark {
    position: absolute;
    right: 0.8rem;
    bottom: -0.8rem;
    color: rgba(255, 255, 255, 0.1);
    font-size: 4.2rem;
    font-weight: 700;
    line-height: 1;
}

.amb-federada-contact-card__body {
    padding: 1rem 1.1rem 1.15rem;
}

.amb-federada-contact-card__no-data {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    border-radius: 10px;
    background: #f4f8fb;
    padding: 0.9rem;
    color: #738394;
    font-size: 0.75rem;
    line-height: 1.55;
}

.amb-federada-contact-card__no-data[hidden] {
    display: none !important;
}

.amb-federada-contact-card__details {
    display: grid;
    gap: 0.85rem;
}

.amb-federada-contact-card__details[hidden] {
    display: none !important;
}

.amb-federada-contact-row {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0.7rem;
    align-items: start;
}

.amb-federada-contact-row[hidden] {
    display: none !important;
}

.amb-federada-contact-row dt {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #e8f3f8;
    color: #067a92;
}

.amb-federada-contact-row dd > span {
    display: block;
    color: #a0a9b2;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.amb-federada-contact-row dd > p,
.amb-federada-contact-row dd > a {
    display: block;
    margin-top: 0.15rem;
    color: #34475a;
    font-size: 0.73rem;
    font-weight: 600;
    line-height: 1.45;
}

.amb-federada-contact-row dd > a {
    color: #0572c1;
}

.amb-federada-contact-row dd > a:hover {
    text-decoration: underline;
}

/*
|--------------------------------------------------------------------------
| Animações e responsividade
|--------------------------------------------------------------------------
*/

@keyframes ambFiliadasPanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .amb-federadas-map-shell {
        padding-bottom: 1rem;
    }

    .amb-federadas-map {
        height: 390px;
    }

    .amb-federadas-map-select {
        width: calc(100% - 2rem);
        margin-inline: 1rem;
    }

    .amb-filiadas-sidebar-link:hover {
        transform: none;
    }
}

@media (max-width: 479px) {
    .amb-federadas-map {
        height: 330px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .amb-filiadas-tab,
    .amb-filiadas-sidebar-link,
    .amb-filiadas-sidebar-link__icon,
    .amb-filiadas-tab-panel,
    .amb-federada-contact-card {
        animation: none !important;
        transition: none !important;
    }
}
