/**
 * GX ONE — Onda de dictado tipo línea de tiempo (patrón ChatGPT / Cursor).
 * Dueño 2026-09-28. Lógica en js/dictation_waveform.js.
 * Overrides sobre el god file (index.html) sin tocarlo:
 *  - fuera el azul pulsante del input mientras graba (.recording #userInput);
 *  - fuera las 8 barras «embudo» (#inputAudioBars .audio-bar);
 *  - el texto del input se oculta mientras graba/transcribe (onda limpia).
 */

/* Sin azul: el input grabando se ve igual que en reposo */
#chatInputContainer.recording #userInput,
.recording #userInput {
    background: transparent !important;
    border-color: inherit !important;
    box-shadow: none !important;
    animation: none !important;
}

/* Las barras viejas mueren visualmente; #inputAudioBars sigue siendo el contenedor de la ✕ */
#inputAudioBars .audio-bar { display: none !important; }

/* Texto oculto mientras graba y mientras transcribe (vuelve con lo dictado agregado) */
body.gx-dictating #userInput,
body.gx-transcribing #userInput {
    color: transparent !important;
    caret-color: transparent !important;
    text-shadow: none !important;
}
body.gx-dictating #userInput::placeholder,
body.gx-transcribing #userInput::placeholder { color: transparent !important; }

/* Celular vertical grabando: el «+» no sirve mientras dictás → lugar para la onda (ChatGPT igual) */
body.gx-mobile-portrait.gx-dictating #btnAttach,
body.gx-mobile-portrait.gx-transcribing #btnAttach { display: none !important; }

/* La onda: a todo el ancho entre la ✕ (izquierda) y el ■ (derecha) */
#gxDictationWave {
    display: none;
    position: absolute;
    left: 48px;
    top: 0;
    /* canvas = elemento reemplazado: left+right no lo estiran; ancho explícito */
    width: calc(100% - 102px);
    height: 100%;
    pointer-events: none;
    z-index: 11;
}

/* «Transcribiendo…» en el lugar de la onda */
.gx-dictation-status {
    display: none;
    position: absolute;
    left: 14px;
    right: 54px;
    top: 0;
    height: 100%;
    align-items: center;
    justify-content: flex-start;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    pointer-events: none;
    z-index: 11;
    animation: gxDictationStatusPulse 1.4s ease-in-out infinite;
}
@keyframes gxDictationStatusPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* ■ de parar: rojo suave, única señal de «grabando» (el mic ya lo transforma mic_holder_whisper) */
#btnMicDictate.gx-as-stop {
    background: rgba(239, 68, 68, 0.30) !important;
    animation: none !important;   /* sin el pulso/escala del god file (.btn-mic-dictate.recording) */
}
#btnMicDictate.gx-as-stop:hover { background: rgba(239, 68, 68, 0.45) !important; }
