/* ============================================================
   Dictado por voz — boton de microfono para textareas
   (activa en cualquier textarea[data-speech="true"])
   ============================================================ */

.speech-wrap {
    position: relative;
}

.speech-textarea {
    padding-right: 44px !important; /* espacio para el boton */
}

.speech-mic-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 32px;
    height: 32px;
    border: 1px solid #dfe3ee;
    border-radius: 50%;
    background: #f8f9fc;
    color: #6b7286;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.15s ease;
}

.speech-mic-btn:hover {
    border-color: #924AEF;
    color: #924AEF;
    background: #f5f1ff;
}

/* Estado escuchando: rojo pulsante */
.speech-mic-btn.speech-mic-listening {
    background: #e3282f;
    border-color: #e3282f;
    color: #fff;
    animation: speechMicPulse 1.2s infinite;
}

@keyframes speechMicPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(227, 40, 47, 0.45);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(227, 40, 47, 0);
    }
}

/* Textarea mientras dicta (resultado parcial) */
.speech-dictando {
    border-color: #e3282f !important;
    box-shadow: 0 0 0 3px rgba(227, 40, 47, 0.12);
    font-style: italic;
    color: #6b7286;
}
