/* Estilos para herramientas de accesibilidad */

/* Panel de accesibilidad */
.accessibility-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.accessibility-panel.show {
    opacity: 1;
    visibility: visible;
}

.accessibility-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.accessibility-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-accessibility {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-accessibility:hover {
    background: rgba(255, 255, 255, 0.2);
}

.accessibility-content {
    padding: 25px;
    max-height: 60vh;
    overflow-y: auto;
}

.accessibility-section {
    margin-bottom: 25px;
}

.accessibility-section h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.accessibility-option {
    margin-bottom: 15px;
    padding: 12px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.accessibility-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.accessibility-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    margin-bottom: 8px;
}

.accessibility-option input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: #667eea;
}

.font-size-controls {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.font-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
}

.font-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.accessibility-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.reset-btn,
.save-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reset-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.save-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

/* Botón de accesibilidad */
#accessibilityBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

#accessibilityBtn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#accessibilityBtn i {
    font-size: 16px;
}

/* Modo alto contraste */
.high-contrast {
    filter: contrast(150%) brightness(120%);
}

.high-contrast * {
    border-color: #000 !important;
    background-color: #fff !important;
    color: #000 !important;
}

.high-contrast .gradient-bg {
    background: #000 !important;
    color: #fff !important;
}

/* Modo dislexia */
.dyslexia-mode {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Arial', sans-serif !important;
    line-height: 1.6 !important;
    letter-spacing: 0.1em !important;
    word-spacing: 0.2em !important;
}

.dyslexia-mode p,
.dyslexia-mode div,
.dyslexia-mode span {
    font-weight: 400 !important;
}

/* Interfaz simplificada */
.simplified-interface .toolbar,
.simplified-interface .sidebar,
.simplified-interface .complex-controls {
    display: none !important;
}

.simplified-interface .main-content {
    margin: 0 !important;
    padding: 20px !important;
}

.simplified-interface .verse-container {
    font-size: 18px !important;
    line-height: 1.8 !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* Navegación por teclado */
.keyboard-navigation *:focus {
    outline: 3px solid #667eea !important;
    outline-offset: 2px !important;
}

.keyboard-navigation button:focus,
.keyboard-navigation a:focus,
.keyboard-navigation input:focus,
.keyboard-navigation select:focus,
.keyboard-navigation textarea:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}

/* Alertas de accesibilidad */
.accessibility-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 15px 20px;
    z-index: 10001;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    border-left: 4px solid #667eea;
}

.accessibility-alert.show {
    transform: translateX(0);
}

.accessibility-alert.success {
    border-left-color: #27ae60;
}

.accessibility-alert.error {
    border-left-color: #e74c3c;
}

.accessibility-alert.warning {
    border-left-color: #f39c12;
}

.accessibility-alert.info {
    border-left-color: #3498db;
}

.alert-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.close-alert {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-alert:hover {
    background: #f0f0f0;
    color: #333;
}

/* Modal de ayuda */
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.help-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.help-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.help-content ul {
    margin: 0 0 20px 0;
    padding-left: 20px;
}

.help-content li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.5;
}

.help-content strong {
    color: #667eea;
    font-weight: 600;
}

.close-help {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.close-help:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Anuncios del lector de pantalla */
#screen-reader-announcements {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .accessibility-panel {
        width: 95%;
        margin: 20px;
    }
    
    .accessibility-content {
        padding: 20px;
    }
    
    .accessibility-actions {
        flex-direction: column;
    }
    
    .help-content {
        width: 95%;
        margin: 20px;
        padding: 20px;
    }
}

/* Tema oscuro */
[data-theme="dark"] .accessibility-panel {
    background: #2d3748;
    color: white;
}

[data-theme="dark"] .accessibility-section h4 {
    color: #e2e8f0;
    border-bottom-color: #4299e1;
}

[data-theme="dark"] .accessibility-option {
    border-color: #4a5568;
    background: #4a5568;
}

[data-theme="dark"] .accessibility-option:hover {
    border-color: #4299e1;
    background: #2b6cb0;
}

[data-theme="dark"] .accessibility-option label {
    color: #e2e8f0;
}

[data-theme="dark"] .accessibility-actions {
    border-top-color: #4a5568;
}

[data-theme="dark"] .accessibility-alert {
    background: #2d3748;
    color: white;
}

[data-theme="dark"] .close-alert {
    color: #a0aec0;
}

[data-theme="dark"] .close-alert:hover {
    background: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .help-content {
    background: #2d3748;
    color: white;
}

[data-theme="dark"] .help-content h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .help-content li {
    color: #a0aec0;
}

[data-theme="dark"] .help-content strong {
    color: #4299e1;
}

/* Mejoras de accesibilidad */
.accessibility-option:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.font-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animaciones */
@keyframes accessibilitySlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.accessibility-panel.show {
    animation: accessibilitySlideIn 0.3s ease;
}

/* Estados de carga */
.accessibility-panel.loading {
    opacity: 0.7;
    pointer-events: none;
}

.accessibility-panel.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
} 