/* Fixed modal geometry: captions and audio status never reflow the chat. */
.moh-voice-dialog{box-sizing:border-box;position:fixed;inset:12px;margin:auto;width:min(620px,calc(100% - 24px));height:min(760px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:24px;border:1px solid #ffffff26;border-radius:30px;background:#151518;color:#f3f3f4;box-shadow:0 18px 80px #0006;overflow:hidden;color-scheme:dark}
.moh-voice-dialog[open]{display:flex;flex-direction:column;align-items:center;gap:16px;animation:moh-voice-enter 200ms ease-out}
/* Nothing of the chat behind shows through: the backdrop is a solid surface, not a tint. */
.moh-voice-dialog::backdrop{background:#0b0b0d}
.moh-voice-header{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;flex:none}
.moh-voice-header h2{margin:0;font:600 19px/1.35 system-ui}
.moh-voice-dialog button{color:inherit;font:500 15px/1.3 system-ui;cursor:pointer}
.moh-voice-close{border:1px solid #8884;border-radius:50%;background:#8882;min-width:44px;height:44px;font-size:28px!important}
.moh-voice-portrait{width:min(52vw,230px);height:min(35dvh,270px);flex:0 1 270px;min-height:90px;margin-top:auto;display:grid;place-items:center;background:transparent;border:0;border-radius:50%}
.moh-voice-head{display:block;width:72%;height:90%;max-height:240px;position:relative;border-radius:47% 47% 44% 44%;border:1px solid #7c8389;background:radial-gradient(ellipse at 36% 25%,#fff 0%,#c8ced2 38%,#51555c 80%,#0a0c10 100%);box-shadow:inset 0 -12px 15px #0008,0 12px 30px #0002}
.moh-voice-head::before{content:'';position:absolute;inset:14% 12% 9%;border:1.5px solid #80ddd3;border-top-color:transparent;border-radius:25% 25% 48% 48%}
.moh-voice-head::after{content:'';position:absolute;inset:40% auto auto 49%;width:3px;height:19%;border-radius:4px;background:#666;transition:background 150ms ease}
.moh-voice-portrait.is-speaking .moh-voice-head::after{background:#27b7ff;box-shadow:0 0 12px #27b7ff}
.moh-voice-status{margin:0;min-height:27px;max-width:100%;text-align:center;overflow-wrap:anywhere;font:500 18px/1.5 system-ui}
.moh-voice-captions{overflow:auto;overscroll-behavior:contain;width:100%;height:120px;min-height:65px;flex:0 1 160px;scrollbar-width:thin}
.moh-voice-captions p{font:16px/1.5 system-ui;margin:0 0 10px;white-space:pre-wrap;overflow-wrap:anywhere}
.moh-voice-prompt{text-align:end;opacity:.65}
.moh-voice-controls{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;width:100%}
.moh-voice-controls button{min-height:42px;padding:10px 18px;background:#8882;border:1px solid #8884;border-radius:24px}
.moh-voice-disclosure{font:12px/1.45 system-ui;opacity:.6;text-align:center;max-width:360px;margin:auto 0 0}
.moh-voice-dialog [hidden]{display:none!important}
.moh-voice-dialog button:focus-visible{outline:2px solid #39adff;outline-offset:3px}
.message-action-btn[data-audio-state=loading]{opacity:.6}
@keyframes moh-voice-enter{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
@media(prefers-color-scheme:light){.moh-voice-dialog{color-scheme:light;background:#fff;color:#18181b;border-color:#0002}.moh-voice-dialog::backdrop{background:#f2f2f4}}
@media(prefers-reduced-motion:reduce){.moh-voice-dialog[open]{animation:none}.moh-voice-head::after{transition:none}}
@media(max-height:550px){.moh-voice-dialog{gap:8px;padding:14px}.moh-voice-portrait{height:90px;flex-basis:90px}.moh-voice-captions{height:65px}.moh-voice-disclosure{margin:0}}

.moh-audio-notice{position:fixed;z-index:2147483646;inset:80px 16px auto;margin:auto;width:fit-content;max-width:min(480px,calc(100% - 32px));box-sizing:border-box;padding:12px 18px;border:1px solid #8885;border-radius:14px;background:#202024;color:#fff;box-shadow:0 8px 28px #0003;font:14px/1.4 system-ui;text-align:center;pointer-events:none;overflow-wrap:anywhere}
body.app-black-surfaces .moh-voice-dialog,html[data-theme=dark] .moh-voice-dialog,body[data-theme=dark] .moh-voice-dialog{color-scheme:dark;background:#151518;color:#f3f3f4;border-color:#ffffff26}
html[data-theme=light] .moh-voice-dialog,body[data-theme=light] .moh-voice-dialog{color-scheme:light;background:#fff;color:#18181b;border-color:#0002}
body.app-black-surfaces .moh-voice-dialog::backdrop,html[data-theme=dark] .moh-voice-dialog::backdrop,body[data-theme=dark] .moh-voice-dialog::backdrop{background:#0b0b0d}
html[data-theme=light] .moh-voice-dialog::backdrop,body[data-theme=light] .moh-voice-dialog::backdrop{background:#f2f2f4}
html[data-theme=light] .moh-audio-notice,body[data-theme=light] .moh-audio-notice{background:#fff;color:#18181b}

/* Voice screen: menu instead of title/close, settings panel, minimised head with the chat above. */
.moh-voice-header{position:relative;justify-content:flex-start}
.moh-voice-menu{border:1px solid #8884;border-radius:50%;background:#8882;min-width:44px;height:44px;font-size:20px!important}
.moh-voice-menu-panel{position:absolute;top:50px;left:0;z-index:2;display:flex;flex-direction:column;gap:6px;padding:8px;border:1px solid #8884;border-radius:16px;background:var(--surface,#111);box-shadow:0 12px 30px #0006}
.moh-voice-menu-panel button{min-height:40px;padding:8px 14px;border:0;border-radius:10px;background:transparent;text-align:left;font:500 15px/1.3 system-ui;color:inherit}
.moh-voice-menu-panel button:hover{background:#8882}
.moh-voice-settings{display:flex;flex-direction:column;gap:10px;width:100%;padding:12px;border:1px solid #8884;border-radius:16px;background:#8881}
.moh-voice-settings label{display:flex;align-items:center;justify-content:space-between;gap:12px;font:500 15px/1.3 system-ui}
.moh-voice-settings select{min-width:150px;min-height:36px;border:1px solid #8884;border-radius:10px;background:#8882;color:inherit;padding:4px 8px}
.moh-voice-settings-done{align-self:flex-end;min-height:36px;padding:6px 16px;border:1px solid #8884;border-radius:18px;background:#8882;color:inherit}
.moh-voice-history{flex:1 1 auto;width:100%;overflow:auto;display:flex;flex-direction:column;gap:10px;padding:4px 6px}
.moh-voice-history p{margin:0;font:400 15px/1.45 system-ui;overflow-wrap:anywhere}
.moh-voice-history-user{text-align:right;opacity:.7}
.moh-voice-dialog.is-minimized .moh-voice-portrait{width:96px;height:96px;flex-basis:96px;min-height:96px;margin-top:0}
.moh-voice-dialog.is-minimized .moh-voice-captions,.moh-voice-dialog.is-minimized .moh-voice-disclosure{display:none}
.moh-voice-dialog.is-minimized .moh-voice-status{font-size:14px}
/* Minimised: the dialog keeps its own opaque surface (no tint, no blur) with this conversation's turns above the head; the chat behind never shows through. */
.moh-voice-dialog.is-minimized .moh-voice-history{padding-top:28px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 14%,#000 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 14%,#000 100%);overscroll-behavior:contain}
