/* =============================================================
   Tag de versão discreta no rodapé — só aparece no hover
   ============================================================= */
.footer-version-tag {
    display: inline-block;
    font-size: .65rem;
    color: rgba(0, 0, 0, .35);
    text-decoration: none;
    font-family: 'Courier New', monospace;
    letter-spacing: .03em;
    opacity: 0;
    transition: opacity .2s ease, color .2s ease;
}
/* Em rodapés escuros, usa tom claro */
.main-footer .footer-version-tag,
footer.bg-default .footer-version-tag {
    color: rgba(255, 255, 255, .35);
}
footer:hover .footer-version-tag,
.main-footer:hover .footer-version-tag,
.footer-version-tag:hover,
.footer-version-tag:focus {
    opacity: 1;
}
.footer-version-tag:hover,
.footer-version-tag:focus {
    text-decoration: none;
}
.main-footer .footer-version-tag:hover,
.main-footer .footer-version-tag:focus,
footer.bg-default .footer-version-tag:hover,
footer.bg-default .footer-version-tag:focus {
    color: #fff;
}
footer:not(.main-footer):not(.bg-default) .footer-version-tag:hover,
footer:not(.main-footer):not(.bg-default) .footer-version-tag:focus {
    color: #000;
}

/* =============================================================
   Acessibilidade — Widget flutuante (zoom + alto contraste)
   ============================================================= */

.a11y-widget {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    font-family: inherit;
}

.a11y-widget__toggle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background-color: #0d6efd;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: transform .15s ease, background-color .15s ease;
}

.a11y-widget__toggle:hover,
.a11y-widget__toggle:focus {
    background-color: #0b5ed7;
    transform: scale(1.05);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.a11y-widget__panel {
    background: #fff;
    border-radius: .5rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
    padding: .75rem;
    min-width: 220px;
    display: none;
}

.a11y-widget.is-open .a11y-widget__panel {
    display: block;
}

.a11y-widget__title {
    font-size: .85rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 .5rem 0;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.a11y-widget__group {
    margin-bottom: .65rem;
}

.a11y-widget__group:last-child { margin-bottom: 0; }

.a11y-widget__label {
    font-size: .75rem;
    color: #555;
    display: block;
    margin-bottom: .25rem;
}

.a11y-widget__buttons {
    display: flex;
    gap: .25rem;
}

.a11y-widget__btn {
    flex: 1;
    min-height: 2.25rem;
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    color: #212529;
    border-radius: .35rem;
    cursor: pointer;
    font-weight: 600;
    transition: background-color .15s ease, border-color .15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
}

.a11y-widget__btn:hover,
.a11y-widget__btn:focus {
    background-color: #e9ecef;
    border-color: #adb5bd;
    outline: none;
}

.a11y-widget__btn.is-active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.a11y-widget__zoom-value {
    flex: 0 0 3.5rem;
    text-align: center;
    font-weight: 700;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* =============================================================
   Alto contraste — Aplicado via classe no <html>
   ============================================================= */

html.a11y-high-contrast,
html.a11y-high-contrast body {
    background: #000 !important;
    color: #fff !important;
}

html.a11y-high-contrast *:not(i):not(.fa):not(.fas):not(.far):not(.fab) {
    background-color: #000 !important;
    color: #ffeb3b !important;
    border-color: #ffeb3b !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.a11y-high-contrast a,
html.a11y-high-contrast a * {
    color: #00e5ff !important;
    text-decoration: underline !important;
}

html.a11y-high-contrast button,
html.a11y-high-contrast .btn,
html.a11y-high-contrast input[type="submit"],
html.a11y-high-contrast input[type="button"] {
    background-color: #ffeb3b !important;
    color: #000 !important;
    border: 2px solid #ffeb3b !important;
}

html.a11y-high-contrast button:hover,
html.a11y-high-contrast .btn:hover {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

html.a11y-high-contrast input,
html.a11y-high-contrast select,
html.a11y-high-contrast textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #ffeb3b !important;
}

html.a11y-high-contrast img,
html.a11y-high-contrast video {
    filter: grayscale(1) contrast(1.2);
}

html.a11y-high-contrast .a11y-widget__panel {
    background-color: #000 !important;
    border: 2px solid #ffeb3b !important;
}
