/**
 * EVAS Voice Navigation Styles
 *
 * @package Everyone_Accessibility_Suite
 * @version 1.0.0
 */

/* ==========================================================================
   Voice Controls in Panel
   ========================================================================== */

.evas-voice-section {
    margin-top: 10px;
}

.evas-voice-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.evas-voice-button.evas-listening {
    background: #00a32a;
    border-color: #00a32a;
    color: #fff;
    animation: evas-pulse 1.5s infinite;
}

.evas-voice-button.evas-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes evas-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 163, 42, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 163, 42, 0);
    }
}

/* ==========================================================================
   Voice Indicator
   ========================================================================== */

.evas-voice-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    background: #e6f3e6;
    border-radius: 8px;
}

.evas-voice-pulse {
    width: 16px;
    height: 16px;
    background: #00a32a;
    border-radius: 50%;
    animation: evas-voice-pulse-animation 1s ease-in-out infinite;
}

@keyframes evas-voice-pulse-animation {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.evas-voice-text {
    font-size: 13px;
    font-weight: 500;
    color: #00a32a;
}

/* ==========================================================================
   Transcript
   ========================================================================== */

.evas-voice-transcript {
    margin-top: 10px;
    padding: 10px 15px;
    background: #f0f0f1;
    border-radius: 8px;
    font-size: 14px;
    color: #1e1e1e;
    text-align: center;
}

.evas-voice-transcript.evas-interim {
    color: #757575;
    font-style: italic;
}

/* ==========================================================================
   Feedback Toast
   ========================================================================== */

.evas-voice-feedback {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.evas-voice-feedback.evas-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.evas-voice-feedback--success {
    background: #00a32a;
    color: #fff;
}

.evas-voice-feedback--warning {
    background: #dba617;
    color: #1e1e1e;
}

.evas-voice-feedback--error {
    background: #dc3232;
    color: #fff;
}

.evas-voice-feedback--info {
    background: #2271b1;
    color: #fff;
}

/* ==========================================================================
   Help Modal
   ========================================================================== */

.evas-voice-help-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
}

.evas-voice-help-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.evas-voice-help-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.evas-voice-help-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #2271b1;
    color: #fff;
}

.evas-voice-help-header h3 {
    margin: 0;
    font-size: 18px;
}

#evas-voice-help-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.evas-voice-help-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.evas-voice-help-category {
    margin-bottom: 20px;
}

.evas-voice-help-category:last-child {
    margin-bottom: 0;
}

.evas-voice-help-category h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #2271b1;
    font-size: 14px;
    text-transform: uppercase;
    color: #2271b1;
}

.evas-voice-help-category ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.evas-voice-help-category li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.evas-voice-help-category li:last-child {
    border-bottom: none;
}

.evas-voice-help-category li strong {
    background: #f6f7f7;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    color: #1e1e1e;
}

.evas-voice-help-category li span {
    color: #757575;
    font-size: 13px;
    flex: 1;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
    .evas-voice-help-content {
        width: 95%;
        max-height: 90vh;
    }

    .evas-voice-help-category li {
        flex-direction: column;
    }

    .evas-voice-feedback {
        left: 20px;
        right: 20px;
        transform: translateY(20px);
        text-align: center;
    }

    .evas-voice-feedback.evas-visible {
        transform: translateY(0);
    }
}

