/* Aviso de cookies, preferências, placeholders de terceiros e botão de Libras
 * do portal público (14/10/2026). CSS próprio: o Tailwind do portal é
 * compilado e classe nova não existiria nele. Cores neutras com contraste
 * AA garantido (a cor primária é configurável por Câmara e não serve de fundo
 * para texto sem medir). Tamanhos em rem para acompanhar o A+/A- do portal. */

.sigl-cs-aviso[hidden],
.sigl-cs-modal[hidden],
.sigl-libras-botao[hidden] {
    display: none !important;
}

.sigl-cs-aviso {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 2147483000;
    max-width: 44rem;
    margin: 0 auto;
    padding: 1.25rem;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-top: 4px solid var(--primary-color, #1f2937);
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.sigl-cs-titulo {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #111827;
}

.sigl-cs-texto {
    margin: 0 0 0.75rem;
}

.sigl-cs-texto a,
.sigl-cs-modal a {
    color: #1d4ed8;
    text-decoration: underline;
}

.sigl-cs-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Os três botões do aviso têm o MESMO peso visual: nenhum é link pequeno. */
.sigl-cs-botao {
    flex: 1 1 11rem;
    min-height: 2.75rem;
    padding: 0.625rem 1rem;
    border: 2px solid #1f2937;
    border-radius: 0.375rem;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.sigl-cs-botao:hover {
    background: #f3f4f6;
}

.sigl-cs-botao:focus-visible,
.sigl-cs-fechar:focus-visible,
.sigl-cs-caixa:focus-visible,
.sigl-terceiro__botao:focus-visible,
.sigl-libras-botao:focus-visible,
.sigl-cs-rodape-botao:focus-visible,
.sigl-cs-categoria input:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 2px;
}

/* ----------------------------------------------------------- preferências */

.sigl-cs-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.6);
}

.sigl-cs-caixa {
    position: relative;
    width: 100%;
    max-width: 40rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    padding: 1.5rem;
    background: #ffffff;
    color: #1f2937;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.sigl-cs-fechar {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 0.375rem;
    background: transparent;
    color: #111827;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.sigl-cs-categoria {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}

.sigl-cs-categoria label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-weight: 700;
    color: #111827;
    cursor: pointer;
}

.sigl-cs-categoria input[type="checkbox"] {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
}

.sigl-cs-categoria input[disabled] + span {
    cursor: default;
}

.sigl-cs-categoria p {
    margin: 0.5rem 0 0 2rem;
    font-weight: 400;
}

.sigl-cs-selo {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.75rem;
    font-weight: 600;
}

body.sigl-consentimento-modal-aberto {
    overflow: hidden;
}

/* ------------------------------------------------ conteúdo de terceiros */

.sigl-terceiro {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    min-height: 11.25rem;
    aspect-ratio: 16 / 9;
    padding: 1rem;
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    overflow: hidden;
}

.sigl-terceiro--widget {
    aspect-ratio: auto;
    min-height: 15rem;
}

.sigl-terceiro--mapa {
    aspect-ratio: auto;
    height: 14.375rem;
}

.sigl-terceiro__caixa {
    max-width: 30rem;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1.45;
}

.sigl-terceiro__texto {
    margin: 0 0 0.75rem;
}

.sigl-terceiro__acoes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.sigl-terceiro__botao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.5rem 0.875rem;
    border: 2px solid #1f2937;
    border-radius: 0.375rem;
    background: #ffffff;
    color: #111827 !important;
    font: inherit;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
}

.sigl-terceiro__sempre {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    cursor: pointer;
}

.sigl-terceiro--ativo {
    display: block;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    min-height: 0;
    overflow: visible;
}

.sigl-terceiro--ativo.sigl-terceiro--widget {
    min-height: 0;
}

.sigl-terceiro__iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --------------------------------------------------------------- rodapé */

.sigl-cs-rodape-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.sigl-cs-rodape-links a,
.sigl-cs-rodape-botao {
    text-decoration: underline;
}

.sigl-cs-rodape-botao {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

/* ---------------------------------------------------- botão de Libras */

.sigl-libras-botao {
    position: fixed;
    right: 10px;
    top: calc(50vh - 20px);
    z-index: 2147482999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 0.5rem;
    background: #1351b4; /* azul do VLibras/gov.br, contraste 7:1 com branco */
    color: #ffffff;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sigl-libras-botao[aria-busy="true"] {
    opacity: 0.7;
    cursor: progress;
}

/* ------------------------------------------- alto contraste do portal */

body.contrast .sigl-cs-aviso,
body.contrast .sigl-cs-caixa,
body.contrast .sigl-terceiro {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

body.contrast .sigl-cs-titulo,
body.contrast .sigl-cs-categoria label,
body.contrast .sigl-cs-fechar {
    color: #ffffff !important;
}

body.contrast .sigl-cs-texto a,
body.contrast .sigl-cs-modal a {
    color: #ffff00 !important;
}

body.contrast .sigl-cs-botao,
body.contrast .sigl-terceiro__botao {
    background: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

@media (max-width: 640px) {
    .sigl-cs-aviso {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        padding: 1rem;
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
    }

    .sigl-cs-botao {
        flex-basis: 100%;
    }

    .sigl-cs-caixa {
        padding: 1.25rem 1rem;
    }
}

@media print {
    .sigl-cs-aviso,
    .sigl-cs-modal,
    .sigl-libras-botao {
        display: none !important;
    }
}

.sigl-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
