/**
 * Módulo de Acessibilidade - Estilos
 * Sucuri CMS - Grupo DJL
 */

/* ==================== WIDGET PRINCIPAL ==================== */
#sucuri-acessibilidade {
    position: fixed;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Posicionamentos */
#sucuri-acessibilidade.direita-topo {
    top: 20px;
    right: 20px;
}

#sucuri-acessibilidade.direita-meio {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

#sucuri-acessibilidade.direita-rodape {
    bottom: 20px;
    right: 20px;
}

#sucuri-acessibilidade.esquerda-topo {
    top: 20px;
    left: 20px;
}

#sucuri-acessibilidade.esquerda-meio {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

#sucuri-acessibilidade.esquerda-rodape {
    bottom: 20px;
    left: 20px;
}

/* ==================== BOTÃO DE TOGGLE ==================== */
.acc-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #2196F3;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.acc-toggle:hover {
    background: #1976D2;
    box-shadow: 0 6px 16px rgba(33, 150, 243, 0.5);
    transform: scale(1.05);
}

.acc-toggle:focus {
    outline: 3px solid #FFC107;
    outline-offset: 2px;
}

/* ==================== PAINEL ==================== */
.acc-panel {
    position: absolute;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-top: 12px;
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

/* Posição do painel baseado no widget */
#sucuri-acessibilidade.direita-topo .acc-panel,
#sucuri-acessibilidade.direita-meio .acc-panel,
#sucuri-acessibilidade.direita-rodape .acc-panel {
    right: 0;
}

#sucuri-acessibilidade.esquerda-topo .acc-panel,
#sucuri-acessibilidade.esquerda-meio .acc-panel,
#sucuri-acessibilidade.esquerda-rodape .acc-panel {
    left: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== HEADER DO PAINEL ==================== */
.acc-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acc-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.acc-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.acc-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==================== CONTEÚDO ==================== */
.acc-content {
    padding: 20px;
    max-height: 500px;
    overflow-y: auto;
}

.acc-option {
    margin-bottom: 20px;
}

.acc-option:last-child {
    margin-bottom: 0;
}

.acc-option label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

/* ==================== BOTÕES ==================== */
.acc-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
}

.acc-btn:hover {
    background: #ececec;
    border-color: #ccc;
}

.acc-btn.active {
    background: #2196F3;
    color: white;
    border-color: #2196F3;
}

.acc-btn i {
    font-size: 16px;
}

/* ==================== CONTROLES DE TAMANHO DE FONTE ==================== */
.acc-font-size-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.acc-font-decrease,
.acc-font-increase,
.acc-font-reset {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 12px;
    font-weight: 700;
}

.acc-font-size-value {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: #2196F3;
}

/* ==================== SELECT DE FONTES ==================== */
.acc-font-selector {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.acc-font-selector:hover,
.acc-font-selector:focus {
    border-color: #2196F3;
    outline: none;
}

/* ==================== TOGGLE GROUP ==================== */
.acc-toggle-group {
    display: flex;
    gap: 8px;
}

/* ==================== BOTÃO RESET ==================== */
.acc-reset-all {
    background: #FF5252;
    color: white;
    border-color: #FF5252;
}

.acc-reset-all:hover {
    background: #E53935;
    border-color: #E53935;
}

/* ==================== MODO ESCURO ==================== */
body.acc-dark-mode {
    background-color: #121212 !important;
    color: #E0E0E0 !important;
}

body.acc-dark-mode * {
    background-color: inherit;
    color: inherit;
}

body.acc-dark-mode a {
    color: #64B5F6 !important;
}

body.acc-dark-mode .acc-panel {
    background: #1E1E1E;
    color: #E0E0E0;
}

body.acc-dark-mode .acc-option label {
    color: #E0E0E0;
}

body.acc-dark-mode .acc-btn {
    background: #2C2C2C;
    border-color: #404040;
    color: #E0E0E0;
}

body.acc-dark-mode .acc-btn:hover {
    background: #383838;
}

body.acc-dark-mode .acc-font-selector {
    background: #2C2C2C;
    border-color: #404040;
    color: #E0E0E0;
}

/* ==================== ALTO CONTRASTE ==================== */
body.acc-high-contrast {
    filter: contrast(1.5) !important;
}

body.acc-high-contrast * {
    filter: none;
}

/* ==================== FONTE PARA DISLEXIA ==================== */
body.acc-dyslexic-font,
body.acc-dyslexic-font * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', cursive !important;
    letter-spacing: 0.05em !important;
    line-height: 1.8 !important;
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 768px) {
    .acc-panel {
        width: 280px;
    }

    #sucuri-acessibilidade {
        right: 10px !important;
        left: auto !important;
        top: auto !important;
        bottom: 20px !important;
        transform: none !important;
    }

    .acc-panel {
        bottom: 70px;
        right: 0;
        margin-top: 0;
    }

    .acc-toggle {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
}

/* ==================== ACESSIBILIDADE DE FOCO ==================== */
*:focus-visible {
    outline: 3px solid #FFC107;
    outline-offset: 2px;
}

/* ==================== SCROLLBAR CUSTOMIZADA ==================== */
.acc-content::-webkit-scrollbar {
    width: 6px;
}

.acc-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.acc-content::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 10px;
}

.acc-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==================== ANIMAÇÕES ==================== */
.acc-btn {
    position: relative;
    overflow: hidden;
}

.acc-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.acc-btn:active::after {
    width: 300px;
    height: 300px;
}
