/* Accessibility enhancements for speech features */

/* High contrast indicators */
.high-contrast-indicator {
    box-shadow: 0 0 0 3px #ff5722 !important;
    outline: 2px solid white !important;
}

/* Improved focus indicators */
button:focus,
select:focus,
.flashcard:focus {
    outline: 3px solid #4285f4 !important;
    outline-offset: 2px !important;
}

/* Improved visual feedback for speech states */
.recording {
    animation: pulse 1.5s infinite;
    background-color: #ff5722 !important;
    color: white !important;
}

/* Accessible pronunciation feedback */
.correct-pronunciation {
    border: 3px solid #4caf50 !important;
    box-shadow: 0 0 10px #4caf50 !important;
}

.incorrect-pronunciation {
    border: 3px solid #f44336 !important;
    box-shadow: 0 0 10px #f44336 !important;
}

/* Pulse animation for recording state */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Keyboard shortcut hints */
.keyboard-shortcut-hint {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    pointer-events: none;
}

/* Help overlay for keyboard shortcuts */
.keyboard-shortcuts-help {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.keyboard-shortcuts-help h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.keyboard-shortcuts-help table {
    width: 100%;
    border-collapse: collapse;
}

.keyboard-shortcuts-help th,
.keyboard-shortcuts-help td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.keyboard-shortcuts-help kbd {
    background-color: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
    color: #333;
    display: inline-block;
    font-size: 0.85em;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    white-space: nowrap;
}

/* Dark mode support */
[data-theme="dark"] .keyboard-shortcuts-help {
    background-color: #333;
    color: #fff;
}

[data-theme="dark"] .keyboard-shortcuts-help th,
[data-theme="dark"] .keyboard-shortcuts-help td {
    border-bottom: 1px solid #555;
}

[data-theme="dark"] .keyboard-shortcuts-help kbd {
    background-color: #444;
    border-color: #666;
    color: #fff;
}