/* Voice surface follows the supplied GrokBot reference, independently of capture. */
.voice-peer{display:block;font-size:calc(11px * var(--ui-font-scale, 1));line-height:14px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#voice-overlay{--voice-accent:#f52b9b;position:fixed;top:82px;left:max(calc(var(--sbw) + 1px),calc(var(--sbw) + (var(--ui-vw,100vw) - var(--sbw) - 1200px)/2));width:min(536px,calc(var(--ui-vw,100vw) - var(--sbw) - 34px));z-index:115;pointer-events:none;display:flex;align-items:center;flex-direction:column}
.voice-float{box-sizing:border-box;display:flex;align-items:center;gap:12px;width:100%;height:90px;padding:14px 16px 14px 24px;border:1px solid #eeeeef;border-radius:50px;background:#fff;box-shadow:0 4px 6px #00000007,0 10px 22px #0000000a;pointer-events:auto}
.voice-float>.botface{width:52px;height:35px;transform:none;background:var(--voice-accent)!important;border-radius:20px!important}
.voice-float>.botface .eye{height:38%;top:24%;width:11%}
.voice-progress{flex:1;min-width:16px;display:flex;flex-direction:column;gap:3px}
.voice-track{height:5px;width:100%;border-radius:8px;background:#e4e4e6;overflow:hidden}
.voice-track i{display:block;height:100%;width:100%;border-radius:8px;background:var(--voice-accent);transform:scaleX(var(--voice-level,0));transform-origin:left;transition:transform 80ms linear}
#vo-status{display:block;width:100%;font-size:calc(10px * var(--ui-font-scale, 1));line-height:14px;color:#77777e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.voice-progress{position:relative}
.chat-model{order:2;flex-shrink:0;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--border);border-radius:18px;background:var(--bg);color:var(--muted);padding:7px 10px;font-size:calc(12px * var(--ui-font-scale, 1));cursor:pointer}
.chat-toolbar .chat-options{order:3;margin-left:0;flex-shrink:0}
.chat-toolbar .chatg-head,.chat-toolbar .chatg-head b{min-width:0}
.model-choices{display:grid;gap:8px}
.model-choice{display:flex;align-items:center;justify-content:space-between;text-align:left;border:1px solid var(--border);border-radius:14px;background:var(--card);color:var(--text);padding:14px;cursor:pointer}
.model-choice small{display:block;color:var(--muted);font-size:calc(12px * var(--ui-font-scale, 1));margin-top:5px}
.model-choice.selected{border-color:var(--primary)}
.model-choice:disabled{opacity:.6;cursor:not-allowed}
@media(max-width:767.98px){.chat-model{margin-left:auto;font-size:calc(11px * var(--ui-font-scale, 1));padding:6px;max-width:90px}.chatg-head b{max-width:68px}.chatg-head{gap:6px;padding:9px}.chatg-head .botface{display:none}.chat-back{flex-shrink:0}}
#voice-overlay[data-state="thinking"] .voice-track i,#voice-overlay[data-state="processing"] .voice-track i,#voice-overlay[data-state="connecting"] .voice-track i{animation:voice-wait 1.2s ease-in-out infinite;transform-origin:center}
#voice-overlay[data-state="speaking"] .voice-track i{animation:voice-wait .65s ease-in-out infinite;transform-origin:center}
@keyframes voice-wait{0%,100%{transform:scaleX(.15);opacity:.45}50%{transform:scaleX(.6);opacity:1}}
@media(prefers-reduced-motion:reduce){#voice-overlay .voice-track i{animation:none!important}}
.voice-actions{display:flex;align-items:center;gap:10px;margin-left:20px}
.voice-actions .ui-round{width:60px;height:60px;border:0;background:#f3f3f4;color:#717176}
.voice-actions .ui-round:hover{background:#ebebed}
.voice-actions .ui-round .ico{width:26px;height:26px;stroke-width:1.8}
.voice-actions .voice-end{background:#ef253a;color:#fff}
.voice-actions .voice-end:hover{background:#db2033}
.voice-actions .voice-end .ico{width:29px;height:29px;stroke-width:2}
.voice-actions .muted{color:#aaaab0}
.voice-actions .voice-send{display:none;background:var(--voice-accent);color:#fff;font-size:calc(28px * var(--ui-font-scale, 1))}
#voice-overlay:is(.listening,[data-state="processing"]) .voice-send{display:inline-flex}
#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions{gap:8px;margin-left:8px}
#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions .ui-round{width:48px;height:48px}
.voice-actions #vo-captions[aria-pressed="true"]{color:var(--voice-accent);background:#fff0f7}
.voice-caption{display:none;pointer-events:auto;margin:12px 12px 0;padding:10px 15px;max-width:calc(100% - 24px);max-height:min(30vh,200px);overflow:auto;border:1px solid var(--border);border-radius:16px;background:#fffffff5;color:var(--text);font-size:calc(13px * var(--ui-font-scale, 1));line-height:1.6;box-shadow:0 4px 16px #00000008;white-space:pre-wrap}
.captions-on .voice-caption:not(:empty),.voice-error .voice-caption:not(:empty){display:block}
.voice-error .voice-caption{background:#fff5f6;color:#b93445;border-color:#f4d9de}
.voice-mode .chatg-inputbar #chat-mic{display:none}
.chatg-inputbar .stop{display:none;background:var(--primary);color:#fff;font-size:calc(17px * var(--ui-font-scale, 1))}
.chatg-inputbar .record-send{display:none;background:var(--primary);color:#fff;font-size:calc(26px * var(--ui-font-scale, 1));flex-shrink:0}
.chatg-inputbar.capturing .record-send,.chatg-inputbar.recognizing .record-send{display:inline-flex}
.chatg-inputbar.capturing .send,.chatg-inputbar.dictating .voice,.chatg-inputbar.voice-processing .send{display:none}
.chatg-inputbar.busy .stop{display:inline-flex;pointer-events:auto;opacity:1}
.chatg-inputbar.busy .send,.chatg-inputbar.busy .voice{display:none}
.voice-mode .chatg-inputbar.busy .stop{display:none}
/* The typed composer stays usable during capture, ASR and a spoken reply. */
.voice-mode .chatg-inputbar.has-text .send{display:inline-flex;pointer-events:auto;opacity:1}
.voice-mode .chatg-inputbar.has-text .record-send{display:none}
.voice-mode .chatg-msgs{margin-top:var(--voice-inset,104px)}
.voice-mode .chatg-inputbar #chat-voice{display:inline-flex;flex-shrink:0;pointer-events:auto;opacity:1;background:var(--primary);color:#fff;animation:none}
.voice-mode .chatg-inputbar #chat-voice .ico{width:23px;height:23px}
.voice-mode .chatg-inputbar #chat-voice[aria-pressed="false"]{background:#eeeeef;color:#97979c}
.chat-feedback[data-kind]:not([data-kind="error"]){background:none;color:#96969c;font-size:calc(12px * var(--ui-font-scale, 1));padding:0 16px 4px;border-radius:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#chat-mic.recording{width:42px;background:var(--primary);color:#fff;box-shadow:none;border-radius:50%}
#chat-form.dictating .composer-capsule{position:relative}
#chat-form.dictating .composer-capsule:after{content:"";position:absolute;bottom:1px;left:8px;height:2px;border-radius:4px;background:var(--primary);width:calc((100% - 60px)*var(--voice-level,0));max-width:calc(100% - 60px);transition:width 80ms linear;pointer-events:none}
@media(max-width:767.98px){
 .voice-mode .chat-toolbar{height:70px;min-height:70px;padding-top:8px;padding-bottom:8px}
 #voice-overlay{--voice-accent:#00bbaa;top:74px;left:17px;width:calc(var(--ui-vw,100vw) - 34px)}
 .voice-float{height:60px;padding:9px 12px;gap:8px;border-radius:34px}
 .voice-float>.botface{width:34px;height:28px;transform:rotate(-16deg)}
 .voice-actions{gap:6px;margin-left:4px}
 .voice-actions #vo-captions{display:none}
 #voice-overlay:is(.listening,[data-state="processing"]) .voice-actions{gap:6px;margin-left:4px}
 #voice-overlay:is(.listening,[data-state="processing"]) .voice-actions .ui-round{width:40px;height:40px}
 .voice-actions .ui-round{width:40px;height:40px;background:#fff;border:1px solid #eeeeef;color:#29292d;box-shadow:0 2px 8px #00000005}
 .voice-actions .ui-round .ico{width:21px;height:21px}
 .voice-actions .voice-end{background:#ed4654;border-color:#ed4654;color:#fff}
 .voice-actions .voice-send{background:#00bbaa;border-color:#00bbaa;color:#fff}
 .voice-actions .voice-end .ico{width:25px;height:25px}
 .voice-actions #vo-captions[aria-pressed="true"]{color:#00a797;background:#eafffa}
 .voice-caption{font-size:calc(12px * var(--ui-font-scale, 1));max-height:25vh}
 .chatg-inputbar #chat-mic.recording{width:40px;height:40px}
}
@media(max-width:350px){.voice-actions .ui-round,#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions .ui-round{width:36px;height:36px}.voice-float{gap:6px;padding:10px}.voice-actions,#voice-overlay:is(.listening,[data-state="processing"]) .voice-actions{gap:4px;margin-left:0}}
[data-theme="dark"] .voice-float{background:#252529;border-color:#36363b}
[data-theme="dark"] .voice-actions .ui-round{background:#36363c;color:#ededee;border-color:#44444a}
[data-theme="dark"] .voice-actions .voice-end{background:#ed354b;color:#fff;border-color:#ed354b}
[data-theme="dark"] .voice-track{background:#45454b}
[data-theme="dark"] .voice-caption{background:#26262b;border-color:#414148;color:#e8e8ed}
[data-theme="dark"] .voice-error .voice-caption{color:#ffb6c1;background:#412831}

[data-theme="dark"] .voice-actions .voice-send{background:var(--voice-accent);color:#fff;border-color:var(--voice-accent)}
.voice-input-settings select{max-width:min(62%,360px);min-width:0;text-overflow:ellipsis}.voice-input-settings meter{width:55%;height:18px;accent-color:var(--accent,#1684ff)}.voice-input-settings{border-top:1px solid var(--border,#e8e8e8);border-bottom:1px solid var(--border,#e8e8e8);padding:8px 0 14px;margin:8px 0}

/* P117: shared PC/mobile measured voice waveform; scoped above legacy refinements. */
#voice-overlay .voice-waveform{display:flex;align-items:center;justify-content:center;gap:2px;width:100%;height:32px;min-height:32px;margin:0;padding:0;border:0;background:transparent;color:var(--voice-accent);border-radius:8px;box-shadow:none;cursor:default;overflow:hidden}
#voice-overlay .voice-waveform i{display:block;flex:1 1 3px;max-width:4px;min-width:1px;height:3px;border-radius:3px;background:currentColor;transition:height 70ms linear;pointer-events:none}
#voice-overlay .voice-progress{min-width:58px;gap:1px}
#voice-overlay .voice-peer{display:none}
#voice-overlay .voice-float{height:76px;padding:10px 16px;gap:12px}
#voice-overlay .voice-actions{gap:8px;margin-left:8px}
#voice-overlay .voice-actions .ui-round{width:44px;height:44px;flex-shrink:0}
#voice-overlay .voice-float>.botface{flex-shrink:0;transform:rotate(calc(-12deg + var(--voice-energy,0)*8deg)) scale(calc(1 + var(--voice-energy,0)*.12));transition:transform 90ms linear}
#voice-overlay .voice-float>.botface .eye{transform:scaleY(calc(1 + var(--voice-energy,0)*.25));transition:transform 90ms linear}
#voice-overlay.output-blocked .voice-waveform{cursor:pointer;color:var(--muted,#777)}
#voice-overlay .voice-waveform:focus-visible{outline:2px solid var(--voice-accent);outline-offset:2px}
@media(max-width:767.98px){
 #voice-overlay .voice-float{height:68px;padding:8px 10px;gap:8px}
 #voice-overlay .voice-actions{gap:6px;margin-left:2px}
 #voice-overlay .voice-actions .ui-round{width:36px;height:36px}
 #voice-overlay .voice-float>.botface{width:30px;height:28px}
 #voice-overlay #vo-status{font-size:calc(10px * var(--ui-font-scale, 1));line-height:14px}
 #voice-overlay .voice-waveform{gap:1px;height:30px;min-height:30px}
}
@media(prefers-reduced-motion:reduce){#voice-overlay .voice-waveform i{transition:none}#voice-overlay .voice-float>.botface,#voice-overlay .voice-float>.botface .eye{transform:none;transition:none}}
