/* Command voice stays with the streaming toolbar, including wall fullscreen. */
.voice-command-bar{display:flex;align-items:center;gap:8px;min-width:0;padding:4px 8px;border:1px solid var(--border,#39414a);border-radius:8px;background:var(--surface,#171c22);color:var(--text,#edf1f5)}
.voice-command-bar[hidden]{display:none!important}.voice-channel-badge{font-size:14px;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.voice-bar-state{font-size:12px;color:var(--text-secondary,#b1bbc7)}
.voice-command-bar .voice-ptt{min-height:44px;min-width:108px;touch-action:none;white-space:normal;background:#f7bb40;color:#181a1e;border:1px solid #f7bb40}.voice-command-bar .voice-ptt[aria-pressed=true]{background:#a42a30;color:#fff;border-color:#ff7075}.voice-command-bar button:disabled{opacity:.55}
html[data-theme=light] .voice-command-bar{background:#fff;color:#171c22;border-color:#66717d}html[data-theme=light] .voice-bar-state{color:#465260}
.live-viewer .uas-wall-toolbar{position:sticky;top:0;z-index:20;flex-wrap:wrap;flex-shrink:0;background:var(--surface,#171c22)}.live-viewer .voice-open{min-height:44px}.live-viewer .voice-command-bar{margin-left:auto}
.voice-panel .voice-local-audio,.voice-remote-audio section{display:grid;gap:12px;padding:12px;border:1px solid #65717d;border-radius:8px;margin:12px 0}.voice-local-audio label,.voice-remote-audio label{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,2fr) 44px;align-items:center;gap:8px}.voice-local-audio select{grid-column:2/4;max-width:100%;min-width:0}.voice-panel input[type=range]{width:100%;min-width:0}.voice-panel meter{width:100%;height:16px}.voice-panel button,.voice-panel select{min-height:44px}.voice-panel button:focus-visible,.voice-command-bar button:focus-visible{outline:2px solid #f7bb40;outline-offset:3px}.voice-panel .voice-remote-audio{border-top:2px solid #65717d;padding-top:12px}
@media(max-width:640px){.live-viewer .voice-command-bar{width:100%;margin:0;display:grid;grid-template-columns:minmax(0,1fr) auto}.voice-channel-badge{max-width:none}.voice-bar-state{grid-column:1;grid-row:2}.voice-command-bar .voice-ptt{grid-column:2;grid-row:1/3}.voice-command-bar>button:not(.voice-ptt){grid-column:1/3}.voice-panel{max-width:calc(100vw - 16px);box-sizing:border-box}.voice-local-audio label,.voice-remote-audio label{grid-template-columns:minmax(0,1fr) 44px}.voice-local-audio select{grid-column:1/3}.voice-local-audio input,.voice-remote-audio input{grid-column:1;grid-row:2}}
@media(max-height:520px) and (min-width:641px){.voice-command-bar{gap:4px;padding:2px 4px}.voice-bar-state{display:none}.voice-channel-badge{max-width:130px}}
@media(prefers-reduced-motion:reduce){.voice-command-bar *{transition:none!important}}

/* Override the legacy compact toolbar only when command voice is present. */
.live-viewer .uas-wall-toolbar:has(#voice-command-bar:not([hidden])){height:auto!important;min-height:52px!important;flex-wrap:wrap!important}
.live-viewer #voice-command-bar .voice-ptt{min-height:44px!important;height:auto!important;width:auto!important;background:#f7bb40!important;color:#181a1e!important;white-space:normal!important}
.live-viewer #voice-command-bar .voice-ptt[aria-pressed=true]{background:#a42a30!important;color:#fff!important}

html[data-theme] body .voice-panel .voice-local-audio label,html[data-theme] body .voice-panel .voice-remote-audio label{display:grid;align-items:center;gap:8px}

/* The command tile determines the toolbar row height, including fullscreen. */
body.live-viewer.compact-viewer-active .command-console:has(#voice-command-bar:not([hidden]))>.uas-wall-toolbar{height:auto!important;min-height:64px!important;padding:4px 6px!important;box-sizing:border-box;align-items:center!important;flex-wrap:wrap!important}
body.live-viewer.compact-viewer-active #voice-command-bar{max-width:100%;box-sizing:border-box;flex:0 1 auto}
@media(max-width:700px){body.live-viewer.compact-viewer-active #voice-command-bar{order:10;flex:1 0 100%;width:100%;margin:0}body.live-viewer.compact-viewer-active .uas-wall-toolbar .uas-wall-tools{flex:1 1 90px!important}}

@media(max-width:700px){body.live-viewer.compact-viewer-active .uas-wall-toolbar .compact-viewer-brand{display:none!important}body.live-viewer.compact-viewer-active .uas-wall-toolbar .voice-open{white-space:normal!important;height:auto!important;min-height:44px!important;max-width:90px;flex:0 0 auto}}

/* Clear channel setup and local audio health; no dialog content replacement on polling. */
html[data-theme] body .voice-panel{width:min(600px,calc(100vw - 24px));max-width:calc(100vw - 24px)}
.voice-panel .voice-setup-intro{font-size:14px;line-height:1.5;margin-bottom:12px}
.voice-panel>label{display:grid!important;gap:4px!important;align-items:stretch!important}
.voice-channel-tools{margin:8px 0 12px}.voice-channel-tools button{flex:1;min-width:120px}
.voice-mic-health{display:grid;gap:8px;padding:12px;border:1px solid var(--stroke,#505963);border-radius:8px;margin-top:12px}
.voice-mic-health meter{display:block;width:100%;height:16px}.voice-mic-health p{min-height:3em;font-size:13px;line-height:1.5}
.voice-mic-health[data-signal=detected]{border-color:var(--success,#38ce8c)}
.voice-audio-warning{padding:12px;margin:10px 0!important;border:1px solid #bc7b24;border-radius:8px;font-size:14px;line-height:1.5}
.voice-admin form,.voice-default-setup{display:grid;gap:12px;min-width:0}.voice-default-setup{padding:12px;border:1px solid var(--stroke,#505963);border-radius:8px;margin-top:12px}
.voice-admin .voice-actions button{flex:1;min-width:100px}.voice-panel .voice-delete{background:#b5262d!important;color:white!important;border:1px solid #b5262d!important}
.voice-admin fieldset{min-width:0}.voice-admin fieldset label{min-height:36px;overflow-wrap:anywhere}.voice-panel .voice-admin form>label{display:grid!important;gap:6px}
@media(pointer:coarse){.voice-admin fieldset label{min-height:44px}}

.voice-panel header{flex-wrap:wrap}.voice-radio-link{font-size:12px;margin-left:auto}
