/* ============================================================
   ACESSIBILIDADE — Portal Prefeitura de Catuji
   eMAG v3.1 | WCAG 2.1 AA | LBI (Lei 13.146/2015)
   ============================================================ */

/* ── Skip Links (Pular Navegação) ── */
.skip-links {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10000;
    width: 100%;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    background: #0a1628;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 0 0 6px 0;
    text-decoration: none;
    white-space: nowrap;
    transition: none;
}

/* Torna visível ao receber foco */
.skip-link:focus {
    position: fixed;
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    outline: 3px solid #c9a227;
    outline-offset: 0;
    z-index: 10001;
}

/* ── Barra de Acessibilidade ── */
.acesso-bar {
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 6px 0;
    font-size: 12.5px;
    color: rgba(255,255,255,.75);
}

.acesso-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.acesso-bar-id {
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 600;
    font-size: 12px;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
    letter-spacing: .8px;
    white-space: nowrap;
}

.acesso-bar-id i {
    color: #c9a227;
    font-size: 15px;
}

.acesso-bar-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.acesso-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: rgba(255,255,255,.7);
    font-family: 'Inter', sans-serif;
    font-size: 12.5px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all .18s ease;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.acesso-btn:hover,
.acesso-btn:focus {
    color: #fff;
    background: rgba(255,255,255,.1);
    outline: none;
}

/* Foco visível para teclado (WCAG 2.1 - 2.4.7) */
.acesso-btn:focus-visible {
    outline: 2px solid #c9a227;
    outline-offset: 2px;
}

.acesso-btn.ativo {
    background: rgba(201,162,39,.2);
    color: #c9a227;
}

.acesso-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.acesso-btn i {
    font-size: 12px;
}

.fonte-label {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
}

.fonte-label sup {
    font-size: 9px;
    vertical-align: super;
}

.acesso-sep {
    width: 1px;
    height: 14px;
    background: rgba(255,255,255,.15);
    margin: 0 4px;
    flex-shrink: 0;
}

.acesso-vlibras-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(26,107,201,.3);
    border: 1px solid rgba(26,107,201,.5);
    color: #a8d0f8;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.acesso-vlibras-badge i {
    font-size: 13px;
    color: #64adf0;
}

/* ── Foco visível global (WCAG 2.1 — 2.4.7) ── */
*:focus-visible {
    outline: 2px solid #1a6bc9;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Foco extra reforçado para links e botões */
a:focus-visible,
button:focus-visible {
    outline: 3px solid #c9a227;
    outline-offset: 3px;
}

/* Remove outline padrão apenas quando foco é via mouse */
*:focus:not(:focus-visible) {
    outline: none;
}

/* ── ALTO CONTRASTE ── */
html.alto-contraste {
    /* Forçar fundo branco ou preto absoluto */
    --azul-900:  #000000;
    --azul-800:  #000000;
    --azul-700:  #000000;
    --azul-600:  #000000;
    --azul-500:  #000080;
    --azul-400:  #0000cc;
    --azul-300:  #0000ff;
    --azul-100:  #e0e0ff;
    --azul-50:   #f0f0ff;
    --ouro-500:  #ffff00;
    --ouro-400:  #ffff00;
    --ouro-300:  #ffff00;
    --cinza-900: #000000;
    --cinza-800: #111111;
    --cinza-700: #222222;
    --cinza-600: #333333;
    --cinza-500: #555555;
    --cinza-400: #777777;
    --cinza-300: #aaaaaa;
    --cinza-200: #cccccc;
    --cinza-100: #eeeeee;
    --cinza-50:  #f5f5f5;
    --branco:    #ffffff;
}

html.alto-contraste body {
    background: #fff !important;
    color: #000 !important;
}

html.alto-contraste .portal-topbar,
html.alto-contraste .portal-header,
html.alto-contraste .acesso-bar {
    background: #000 !important;
    border-color: #fff !important;
}

html.alto-contraste .portal-topbar *,
html.alto-contraste .acesso-bar * {
    color: #fff !important;
}

html.alto-contraste .header-logo .cidade { color: #fff !important; }
html.alto-contraste .header-logo .estado { color: #ccc !important; }

html.alto-contraste .nav-link {
    color: #000 !important;
}
html.alto-contraste .nav-link:hover,
html.alto-contraste .nav-link.active {
    background: #000 !important;
    color: #fff !important;
}

html.alto-contraste .nav-dropdown {
    background: #000 !important;
    border-color: #fff !important;
}
html.alto-contraste .dropdown-link {
    color: #fff !important;
}
html.alto-contraste .dropdown-link:hover {
    background: #333 !important;
}

html.alto-contraste .portal-acesso-rapido {
    background: #000 !important;
    border-bottom: 2px solid #fff !important;
}
html.alto-contraste .acesso-item {
    color: #fff !important;
    border-color: #fff !important;
}

html.alto-contraste .noticias-section,
html.alto-contraste .inner-page {
    background: #fff !important;
}

html.alto-contraste .noticia-card,
html.alto-contraste .noticia-destaque,
html.alto-contraste .inner-card {
    background: #fff !important;
    border: 2px solid #000 !important;
}

html.alto-contraste .noticia-card .nc-titulo,
html.alto-contraste .nd-titulo,
html.alto-contraste .section-title,
html.alto-contraste .article-title,
html.alto-contraste h1, html.alto-contraste h2, html.alto-contraste h3 {
    color: #000 !important;
}

html.alto-contraste a {
    color: #000080 !important;
    text-decoration: underline !important;
}
html.alto-contraste a:hover {
    color: #000 !important;
    background: #ffff00 !important;
}

html.alto-contraste .nd-cta,
html.alto-contraste .btn-submit,
html.alto-contraste .search-submit {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

html.alto-contraste .portal-footer {
    background: #000 !important;
    color: #fff !important;
    border-top: 3px solid #fff !important;
}

html.alto-contraste .footer-col h5 { color: #ffff00 !important; }
html.alto-contraste .footer-col a  { color: #fff !important; }

html.alto-contraste .acesso-bar .acesso-btn.ativo {
    background: #ffff00 !important;
    color: #000 !important;
}

html.alto-contraste .portal-breadcrumb {
    background: #000 !important;
    border-color: #fff !important;
}
html.alto-contraste .breadcrumb-list li a { color: #fff !important; }
html.alto-contraste .breadcrumb-list li.current { color: #ffff00 !important; }

html.alto-contraste .page-hero {
    background: #000 !important;
    border-bottom: 3px solid #fff !important;
}
html.alto-contraste .page-hero h1 { color: #fff !important; }
html.alto-contraste .page-hero p  { color: #ccc !important; }

html.alto-contraste .lista-item:hover { background: #ffff00 !important; }
html.alto-contraste .lista-item:hover .lista-item-titulo { color: #000 !important; }

html.alto-contraste .status-chip,
html.alto-contraste .lista-item-badge {
    border: 2px solid currentColor !important;
}

html.alto-contraste .form-group input,
html.alto-contraste .form-group textarea,
html.alto-contraste .form-group select,
html.alto-contraste .search-field input,
html.alto-contraste .search-field select {
    background: #fff !important;
    border: 2px solid #000 !important;
    color: #000 !important;
}

html.alto-contraste .form-group input:focus,
html.alto-contraste .form-group textarea:focus {
    outline: 3px solid #000080 !important;
    border-color: #000080 !important;
}

html.alto-contraste #btn-topo {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

/* ── Indicador de alto contraste ativo (na barra) ── */
html.alto-contraste .acesso-bar {
    background: #000 !important;
    border-bottom: 2px solid #ffff00 !important;
}

html.alto-contraste .acesso-btn {
    color: #fff !important;
}

/* ── Responsividade da barra ── */
@media (max-width: 768px) {
    .acesso-bar-id  { display: none; }
    .acesso-btn span { display: none; }
    .acesso-btn i { font-size: 14px; }
    .acesso-btn { padding: 6px 8px; }
    .acesso-vlibras-badge span { display: none; }
}

@media (max-width: 480px) {
    .acesso-vlibras-badge { display: none; }
    .acesso-sep:nth-child(n+4) { display: none; }
}

/* ── VLibras: garante que o widget não quebre o layout ── */
[vw] {
    display: inline !important;
}
[vw] .enabled {
    width: 62px !important;
    height: 62px !important;
}
