/**
 * Acessibilidade - Estilos para melhorias de acessibilidade
 * Este arquivo contém estilos para melhorar a acessibilidade do tema Lotofacil Elite
 */

/* Skip Links */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    padding: 10px;
    background-color: var(--primary);
    color: white;
    z-index: 9999;
    transition: top 0.3s ease;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skip-link .icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

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

/* Foco visível */
*:focus {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
}

.dark *:focus {
    outline: 2px solid var(--primary-light) !important;
}

body:not(.using-keyboard) *:focus {
    outline: none !important;
}

/* Controles de tamanho de fonte */
.font-size-controls {
    position: fixed;
    bottom: 20px;
    right: 140px;
    display: flex;
    z-index: 999;
    border-radius: 25px;
    background-color: var(--primary);
    box-shadow: var(--shadow);
    padding: 5px;
}

.font-size-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.font-size-controls button .icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.font-size-controls button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Botão de alto contraste */
.high-contrast-toggle {
    position: fixed;
    bottom: 20px;
    right: 80px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    z-index: 999;
    transition: var(--transition);
}

.high-contrast-toggle .icon {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.high-contrast-toggle:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Estilos para alto contraste */
.high-contrast {
    --primary: #0066CC;
    --primary-dark: #004C99;
    --primary-light: #4D94FF;
    --secondary: #CC0000;
    --background-light: #FFFFFF;
    --background-dark: #000000;
    --text-dark: #000000;
    --text-light: #FFFFFF;
    --success: #008000;
    --warning: #FF8C00;
    --danger: #CC0000;
    --info: #0066CC;
}

.high-contrast body {
    background-color: var(--background-light);
    color: var(--text-dark);
}

.high-contrast.dark body {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.high-contrast a {
    color: var(--primary);
    text-decoration: underline;
}

.high-contrast button,
.high-contrast .btn,
.high-contrast .wp-element-button {
    border: 2px solid currentColor;
}

.high-contrast input,
.high-contrast select,
.high-contrast textarea {
    border: 2px solid var(--text-dark);
}

.high-contrast.dark input,
.high-contrast.dark select,
.high-contrast.dark textarea {
    border: 2px solid var(--text-light);
}

.high-contrast *:focus {
    outline: 3px solid var(--primary) !important;
    outline-offset: 2px !important;
}

/* Melhorias para leitores de tela */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Melhorias para bolas de loteria */
.lottery-ball {
    position: relative;
}

.lottery-ball[aria-label] {
    position: relative;
}

.lottery-ball[aria-label]:hover::after {
    content: attr(aria-label);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

/* Melhorias para tabelas */
table {
    border-collapse: collapse;
    width: 100%;
}

table caption {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: left;
}

/* Melhorias para formulários */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input,
select,
textarea {
    max-width: 100%;
}

fieldset {
    border: 1px solid var(--border-color);
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

legend {
    padding: 0 10px;
    font-weight: bold;
}

/* Responsividade para controles de acessibilidade */
@media (max-width: 768px) {
    .font-size-controls,
    .high-contrast-toggle {
        bottom: 10px;
    }
    
    .font-size-controls {
        right: 80px;
    }
    
    .high-contrast-toggle {
        right: 20px;
    }
    
    .font-size-controls button {
        width: 35px;
        height: 35px;
    }
    
    .font-size-controls button .icon {
        width: 20px;
        height: 20px;
    }
    
    .high-contrast-toggle {
        width: 45px;
        height: 45px;
    }
    
    .high-contrast-toggle .icon {
        width: 24px;
        height: 24px;
    }
}

/* Estilos gerais para ícones SVG */
.icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    stroke-width: 0;
    stroke: currentColor;
    fill: currentColor;
    vertical-align: middle;
}

/* Suporte para preferências de redução de movimento */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .skip-link,
    .high-contrast-toggle,
    .font-size-controls button {
        transition: none !important;
    }
}