/* Voice Input - Deepgram Nova-3 STT */

.mic-btn-modern {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-right: 4px;
    position: relative;
}

.mic-btn-modern:hover {
    background: #f3f4f6;
    color: #6D55D6;
}

.mic-btn-modern:active {
    transform: scale(0.95);
}

.mic-btn-modern:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mic-btn-modern:disabled:hover {
    background: transparent;
    color: #6b7280;
}

/* Icon toggling */
.mic-btn-modern .mic-icon-recording {
    display: none;
}

.mic-btn-modern.is-recording .mic-icon-default {
    display: none;
}

.mic-btn-modern.is-recording .mic-icon-recording {
    display: block;
}

/* Recording state */
.mic-btn-modern.is-recording {
    background: #ef4444;
    color: white;
    animation: micPulse 1.5s ease-in-out infinite;
}

.mic-btn-modern.is-recording:hover {
    background: #dc2626;
    color: white;
}

@keyframes micPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Language selector */

.mic-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mic-lang-btn {
    background: #e5e7eb;
    color: #4b5563;
    border: none;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    cursor: pointer;
    letter-spacing: 0.5px;
    margin-top: -2px;
    transition: background 0.15s ease, color 0.15s ease;
}

.mic-lang-btn:hover {
    background: #d1d5db;
    color: #6D55D6;
}

.mic-lang-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    min-width: 170px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 1000;
    padding: 4px 0;
}

.mic-lang-dropdown.open {
    display: block;
}

.mic-lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.1s ease;
    white-space: nowrap;
}

.mic-lang-option:hover {
    background: #f3f4f6;
}

.mic-lang-option.active {
    background: #ede9fe;
    color: #6D55D6;
    font-weight: 600;
}

.mic-lang-option .lang-check {
    margin-left: auto;
    font-size: 12px;
    opacity: 0;
}

.mic-lang-option.active .lang-check {
    opacity: 1;
}
