/* ═══════════════════════════════════════════
   VOICE — TTS + STT
   ═══════════════════════════════════════════ */

/* Botón de leer en voz alta (en cada mensaje del asistente) */
.msg-voice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
}
.msg-voice-btn:hover {
    color: var(--accent);
    background: var(--bg-hover);
}
.msg-voice-btn.reading {
    color: var(--accent);
    animation: voice-pulse 1.2s ease-in-out infinite;
}
@keyframes voice-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

/* Botón del micrófono en el input — hereda tamaño de .input-btn */
.btn-voice-mic {
    padding: 8px !important;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-xs, 8px);
    transition: all 0.15s;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-voice-mic svg {
    width: 20px;
    height: 20px;
}
.btn-voice-mic:hover {
    color: var(--accent);
    background: var(--bg-hover);
}
.btn-voice-mic.listening {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    animation: voice-mic-pulse 1.2s ease-in-out infinite;
}
@keyframes voice-mic-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* En móvil, más grande (como los demás botones del input) */
@media (max-width: 600px) {
    .btn-voice-mic {
        padding: 10px !important;
    }
    .btn-voice-mic svg {
        width: 22px;
        height: 22px;
    }
}
