/* Acessibilidade - CSS */

/* Skip Link - Permite navegação por teclado */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #1e40af;
    color: white;
    padding: 12px 24px;
    z-index: 10000;
    text-decoration: none;
    font-weight: bold;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Foco visível para navegação por teclado */
*:focus-visible {
    outline: 3px solid #1e40af !important;
    outline-offset: 2px !important;
}

/* Melhorar contraste em links e botões */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #1e40af !important;
    outline-offset: 2px !important;
}

/* Modo Alto Contraste */
body.alto-contraste {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #ffff00;
    --border-color: #ffffff;
    --link-color: #ffff00;
}

body.alto-contraste {
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.alto-contraste .bg-white,
body.alto-contraste .bg-surface {
    background-color: #000000 !important;
}

body.alto-contraste .bg-slate-50,
body.alto-contraste .bg-slate-100 {
    background-color: #1a1a1a !important;
}

body.alto-contraste .text-gray-900,
body.alto-contraste .text-gray-800,
body.alto-contraste .text-gray-700 {
    color: #ffffff !important;
}

body.alto-contraste .text-gray-600,
body.alto-contraste .text-gray-500,
body.alto-contraste .text-gray-400 {
    color: #ffff00 !important;
}

body.alto-contraste .border-gray-200,
body.alto-contraste .border-gray-300 {
    border-color: #ffffff !important;
}

body.alto-contraste a {
    color: #ffff00 !important;
    text-decoration: underline !important;
}

body.alto-contraste button,
body.alto-contraste .btn-primary {
    background-color: #ffff00 !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
}

body.alto-contraste input,
body.alto-contraste select,
body.alto-contraste textarea {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #ffffff !important;
}

/* Controle de tamanho de fonte */
body.fonte-pequena {
    font-size: 14px;
}

body.fonte-normal {
    font-size: 16px;
}

body.fonte-grande {
    font-size: 18px;
}

body.fonte-extra-grande {
    font-size: 20px;
}

/* Aumentar espaçamento para leitura */
body.espacamento-aumentado {
    line-height: 1.8;
    letter-spacing: 0.05em;
}

/* Melhorar visibilidade de ícones */
.material-symbols-outlined {
    display: inline-block;
    vertical-align: middle;
}

/* Melhorar contraste de badges de status */
.badge-warning,
.bg-yellow-100 {
    color: #92400e !important;
}

.badge-info,
.bg-blue-100 {
    color: #1e40af !important;
}

.badge-success,
.bg-green-100 {
    color: #166534 !important;
}

.badge-danger,
.bg-red-100 {
    color: #991b1b !important;
}

.badge-secondary,
.bg-gray-100,
.bg-slate-100 {
    color: #374151 !important;
}

/* Animações reduzidas para quem prefere */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Barra de acessibilidade flutuante */
.acessibilidade-bar {
    position: fixed;
    bottom: 84px;
    right: 24px;
    background: white;
    border: 2px solid #1e40af;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.acessibilidade-bar button {
    background: #1e40af;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.acessibilidade-bar button:hover {
    background: #1e3a8a;
}

.acessibilidade-bar button.active {
    background: #16a34a;
}

.acessibilidade-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #1e40af;
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.acessibilidade-toggle:hover {
    transform: scale(1.1);
}

.acessibilidade-toggle span {
    font-size: 24px;
}
