/* ============================================================================
   Barra de acessibilidade — portal de Carlos Gomes/RS

   Atende à dimensão Acessibilidade do Programa Nacional de Transparência
   Pública (PNTP/Atricon), ao eMAG (Modelo de Acessibilidade em Governo
   Eletrônico) e à Lei 13.146/2015, art. 63.

   Recursos: atalhos de teclado, alto contraste, ajuste de fonte, link para
   o mapa do site e integração com o VLibras.
   ========================================================================== */

/* --- Barra ---------------------------------------------------------------- */
.acess-barra {
    background: #1b1b1b;
    color: #fff;
    font-size: 13px;
    padding: 6px 15px;
    position: relative;
    z-index: 1200;
}

.acess-barra .acess-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.acess-barra ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.acess-barra li { margin: 0; }

.acess-barra a,
.acess-barra button {
    color: #fff;
    background: transparent;
    border: 1px solid transparent;
    padding: 4px 9px;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
}

.acess-barra a:hover,
.acess-barra button:hover,
.acess-barra a:focus,
.acess-barra button:focus {
    background: #fff;
    color: #1b1b1b;
    text-decoration: none;
    outline: 2px solid #ffd700;
    outline-offset: 1px;
}

.acess-barra .acess-atalho small {
    opacity: .75;
    font-size: 11px;
    margin-left: 3px;
}

.acess-barra button[aria-pressed="true"] {
    background: #ffd700;
    color: #1b1b1b;
    font-weight: 700;
}

@media (max-width: 767px) {
    .acess-barra .acess-container { justify-content: center; }
    .acess-barra .acess-atalho small { display: none; }
}

/* --- Skip link (primeiro elemento focável da página) ---------------------- */
.acess-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #ffd700;
    color: #1b1b1b;
    padding: 12px 20px;
    font-weight: 700;
    z-index: 2000;
}

.acess-skip:focus {
    left: 0;
    outline: 3px solid #1b1b1b;
}

/* --- Foco visível em todo o portal ---------------------------------------- */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 3px solid #ffd700 !important;
    outline-offset: 2px;
}

/* --- Ajuste de tamanho de fonte ------------------------------------------- */
/* Usa zoom no container: o tema é todo em px, então escalar a raiz não teria
   efeito. O zoom preserva o layout do Bootstrap 3. */
html.acess-fonte-1 .wrapper { zoom: 1.12; }
html.acess-fonte-2 .wrapper { zoom: 1.25; }
html.acess-fonte-3 .wrapper { zoom: 1.40; }

/* --- Alto contraste -------------------------------------------------------- */
html.acess-contraste,
html.acess-contraste body { background: #000 !important; }

html.acess-contraste *:not(.acess-barra):not(.acess-barra *) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.acess-contraste a:not(.acess-barra *),
html.acess-contraste a:not(.acess-barra *) * {
    color: #ffd700 !important;
    text-decoration: underline !important;
}

html.acess-contraste button:not(.acess-barra *),
html.acess-contraste .theam_btn,
html.acess-contraste input,
html.acess-contraste select,
html.acess-contraste textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

html.acess-contraste img,
html.acess-contraste video { filter: grayscale(1) contrast(1.15); }

/* O overlay escuro dos banners esconde o texto no modo contraste. */
html.acess-contraste .overlay:before,
html.acess-contraste .box-layer { display: none !important; }

/* ==========================================================================
   COMPATIBILIDADE VISUAL

   Três elementos trocaram de tag por motivo de acessibilidade, e o CSS do
   tema estilizava justamente a tag antiga (ex.: ".city_top_search a").
   Os blocos abaixo devolvem a aparência original aos novos elementos.
   ========================================================================== */

/* --- Busca do topo -------------------------------------------------------
   Era <div class="city_top_search"> com <a href="javascript:void(0)">.
   Virou <form> com <button type="submit"> para funcionar sem JavaScript e
   ter texto acessível. O tema só estiliza ".city_top_search a". */
.city_top_search { margin: 0; }

.city_top_search button,
.city_top_search #button_pesquisar {
    position: absolute;
    top: 2px;
    right: 0;
    color: #fff;
    font-size: 13px;
    background: none;
    border: 0;
    padding: 0;
    line-height: normal;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.city_top_search button:hover,
.city_top_search button:focus { color: #fff; opacity: .8; }

/* O <label> do campo é oculto visualmente; garante que não ocupe espaço
   mesmo se o .sr-only do Bootstrap não estiver disponível na página. */
.city_top_search label.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Rodapé: dados de contato -------------------------------------------
   Endereço, e-mail e telefone estavam dentro de <a href="#"> (links falsos).
   Viraram texto e links reais (mailto:/tel:). */
.widget_text ul li .rodape-dado,
.widget_text ul li a { color: #fff; font-size: 15px; }
.widget_text ul li a:hover { color: #fff; text-decoration: underline; }

/* --- Cards de secretaria (página de Gabinetes/Secretarias) ---------------
   Telefone e e-mail viraram links reais; horário e endereço viraram texto. */
.city_busine_detail li span { display: block; font-size: 15px; padding: 12px 0 10px; }
.city_busine_detail li span i { margin-right: 20px; font-size: 18px; }

/* --- <main> ---------------------------------------------------------------
   Landmark novo em volta do conteúdo. Navegadores antigos não o tratam
   como bloco por padrão. */
main { display: block; }

/* --- Aviso de cookies (LGPD, arts. 7º, 8º e 9º) --------------------------- */
.cookie-aviso {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1b1b1b;
    color: #fff;
    padding: 16px 20px;
    z-index: 1500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .3);
}

.cookie-aviso-texto { max-width: 780px; }
.cookie-aviso-texto a { color: #ffd700; text-decoration: underline; }

.cookie-aviso-acoes { display: flex; gap: 8px; flex-wrap: wrap; }

.cookie-btn {
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    padding: 8px 16px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

.cookie-btn-aceitar { background: #ffd700; color: #1b1b1b; border-color: #ffd700; font-weight: 700; }
.cookie-btn:hover, .cookie-btn:focus { outline: 2px solid #ffd700; outline-offset: 2px; }

@media (max-width: 767px) {
    .cookie-aviso { flex-direction: column; align-items: stretch; text-align: left; }
}

/* --- Aviso de privacidade em formulários que coletam dados pessoais ------- */
.aviso-privacidade {
    border-left: 3px solid #2196F3;
    background: #f5f9ff;
    padding: 12px 16px;
    margin: 18px 0;
    font-size: 13px;
    line-height: 1.6;
}
