/* Full-page voice view: Croco's quiet mic EQ, Obila's existing colors and controls. */
.immersive-voice {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: max(22px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom));
    border: 0;
    background: var(--surface);
    color: var(--text-primary);
    overflow: hidden;
    font-family: inherit;
}
.immersive-voice[open] { display: flex; flex-direction: column; }
.immersive-voice::backdrop { background: var(--surface); }
.immersive-voice-open { overflow: hidden; }
.immersive-voice-top { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.immersive-voice-brand { font-size: 20px; font-weight: 750; letter-spacing: -0.7px; color: var(--text-secondary); }
.immersive-voice-brand span { color: var(--accent); }
.immersive-voice-close { width: 44px; height: 44px; border-radius: 50%; }
.immersive-voice-center {
    flex: 1;
    min-height: 0;
    width: min(860px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0;
}
/* The initial text inset scrolls away beneath the waveform overlay. */
.immersive-voice-eq {
    position: absolute;
    inset: 0 0 auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 152px;
    padding-bottom: 24px;
    box-sizing: border-box;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--surface) 0%, var(--surface) 70%, transparent 100%);
}
.immersive-voice-eq span {
    display: inline-block;
    width: 8px;
    height: 6px;
    min-height: 3px;
    border-radius: 4px;
    background: rgba(180,180,190,0.35);
    transition: height 0.08s ease-out, background 0.3s ease, box-shadow 0.3s ease;
}
.immersive-voice-eq.speech span { background: var(--accent-80); box-shadow: 0 0 18px var(--accent-10); }
.immersive-voice-hero {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
}
.immersive-voice-hero[hidden] { display: none; }
.immersive-voice-response {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    min-height: 0;
    overflow-y: auto;
    overflow-wrap: anywhere;
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: -0.025em;
    text-align: center;
    padding: 156px 12px 18px;
    scrollbar-width: thin;
}
.immersive-voice-response p { margin: 0 0 0.8em; }
.immersive-voice-response p:last-child { margin-bottom: 0; }
.immersive-voice-response ul, .immersive-voice-response ol { text-align: left; padding-left: 1.5em; margin: 0.8em 0; }
.immersive-voice-response h1, .immersive-voice-response h2, .immersive-voice-response h3 { font-size: 1.15em; margin: 0.7em 0; }
.immersive-voice-response pre { font-size: 0.65em; white-space: pre-wrap; text-align: left; }
.immersive-voice-response table { font-size: 0.75em; max-width: 100%; }
.immersive-voice-bottom { width: min(640px, 100%); margin: 0 auto; flex-shrink: 0; display: flex; flex-direction: column; gap: 18px; }
.immersive-voice-status { min-height: 22px; font-size: 0.82rem; text-align: center; color: var(--text-dim); }
.immersive-voice-status.error { color: var(--danger); }
.immersive-voice-draft-row { display: flex; align-items: flex-end; justify-content: center; gap: 14px; min-height: 40px; }
.immersive-voice-draft {
    flex: 1;
    max-height: 120px;
    resize: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    line-height: 1.5;
    font-size: 1.1rem;
    text-align: center;
}
.immersive-voice-draft.hidden, .immersive-voice-draft[hidden] { display: none; }
.immersive-voice-draft:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }
/* Send button — inline with the transcript, not circular, inactive without text */
.immersive-voice-send {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--send-gradient);
    box-shadow: var(--send-shadow);
    color: #111;
    cursor: pointer;
    transition: filter 0.15s ease, opacity 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.immersive-voice-send:hover:not(:disabled) { filter: brightness(1.08); }
.immersive-voice-send:active:not(:disabled) { transform: scale(0.97); }
.immersive-voice-send:disabled {
    background: transparent;
    border-color: var(--border);
    box-shadow: none;
    color: var(--text-dim);
    cursor: not-allowed;
}
.immersive-voice-send.hidden { display: none; }
.immersive-voice-controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 40px; }
/* Mic toggle — bottom right, same switch visual as the composer's mic toggle */
.immersive-voice-mic { flex-direction: row; gap: 8px; color: var(--text-secondary); }
.immersive-voice-mic .composer-mic-switch-track { background: var(--surface3); }
.immersive-voice-mic .composer-mic-switch-knob { left: 2px; transform: translateX(0); background: var(--text-secondary); transition: transform 0.2s, left 0.2s, background 0.2s; }
.immersive-voice-mic[aria-checked="true"] { color: var(--accent); }
.immersive-voice-mic[aria-checked="true"] .composer-mic-switch-track { background: color-mix(in srgb, var(--accent) 60%, transparent); }
.immersive-voice-mic[aria-checked="true"] .composer-mic-switch-knob { left: 18px; background: #fff; }
.immersive-voice-mic:disabled { opacity: 0.45; cursor: default; }
.immersive-voice-auto { display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 0.85rem; padding: 14px 0; cursor: pointer; }
.immersive-voice-auto .composer-mic-switch-track { background: var(--surface3); }
.immersive-voice-auto .composer-mic-switch-knob { left: 2px; transform: translateX(0); background: var(--text-secondary); transition: transform 0.2s; }
.immersive-voice-auto[aria-checked="true"] .composer-mic-switch-track { background: var(--accent); }
.immersive-voice-auto[aria-checked="true"] .composer-mic-switch-knob { transform: translateX(16px); background: #fff; }
.immersive-voice-auto:disabled { opacity: 0.45; cursor: default; }
.immersive-voice button:focus-visible, .immersive-voice-response:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
@media (max-width: 480px) {
    .immersive-voice { padding-left: 20px; padding-right: 20px; }
    .immersive-voice-eq { gap: 6px; }
    .immersive-voice-eq span { width: 6px; border-radius: 3px; }
    .immersive-voice-controls { gap: 14px; }
    .immersive-voice-bottom { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { .immersive-voice-eq span { transition: background 0.3s ease; } }

.immersive-voice-limit[hidden] { display: none; }
.immersive-voice-limit { margin: 0; flex-shrink: 0; }

.immersive-voice-message { position: relative; padding-top: 44px; }
.immersive-voice-message > .msg-top-right-buttons { z-index: 1; }
