/* Accessibility-focused CSS for Montessori Inspire */

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

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

/* Accessibility toolbar */
.accessibility-toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 15px;
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(calc(100% + 20px));
    transition: transform 0.3s ease;
}

.accessibility-toolbar.open {
    transform: translateX(0);
}

.accessibility-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #2563eb;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    z-index: 1001;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    width: 48px;
    height: 48px;
}

.accessibility-toggle:hover {
    background: #1d4ed8;
}

.accessibility-toggle:focus {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Voice narration controls */
.voice-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.voice-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.voice-btn:hover {
    background: #059669;
}

.voice-btn:disabled {
    background: #6b7280;
    cursor: not-allowed;
}

.voice-btn.active {
    background: #dc2626;
}

/* Text size controls */
.text-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.text-size-btn {
    background: #6366f1;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.text-size-btn:hover {
    background: #4f46e5;
}

/* High contrast mode */
.high-contrast {
    filter: contrast(150%) brightness(110%);
}

.high-contrast-toggle {
    background: #7c3aed;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    margin-bottom: 10px;
}

.high-contrast-toggle:hover {
    background: #6d28d9;
}

/* Text size adjustments */
.text-small {
    font-size: 0.875rem !important;
}

.text-normal {
    font-size: 1rem !important;
}

.text-large {
    font-size: 1.125rem !important;
}

.text-extra-large {
    font-size: 1.25rem !important;
}

/* Focus indicators - removed to allow modern blue focus styles from styles.css */

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Narration highlight */
.narrating {
    background-color: #fef3c7 !important;
    box-shadow: 0 0 0 3px #f59e0b !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

/* Keyboard navigation enhancements */
.activity-card:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Voice status indicator */
.voice-status {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    z-index: 1000;
    display: none;
    font-size: 14px;
}

.voice-status.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reading guide */
.reading-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #f59e0b;
    z-index: 999;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.1s ease;
}

/* Mobile accessibility adjustments */
@media (max-width: 768px) {
    .accessibility-toolbar {
        right: 10px;
        top: 70px;
        width: calc(100% - 20px);
        max-width: 300px;
    }
    
    .accessibility-toggle {
        right: 10px;
        top: 70px;
    }
    
    .voice-status {
        bottom: 10px;
        left: 10px;
        right: 10px;
        text-align: center;
    }
}

/* Print accessibility */
@media print {
    .accessibility-toolbar,
    .accessibility-toggle,
    .voice-status {
        display: none !important;
    }
}