/* MDW v2.2 communications experience — fullscreen, thumb-friendly call stages. */
.call-workspace,[class*="call-shell"]{box-sizing:border-box}
.call-workspace [hidden]{display:none!important}
.call-popup{background:var(--theme-bg,#080b12)}
.call-popup .page.call-window-page{width:100%;height:100dvh;min-height:0;padding:0;margin:0;max-width:none}
.call-workspace{display:flex;flex-direction:column;position:relative;min-height:min(780px,calc(100dvh - 110px));height:calc(100dvh - 110px);max-height:100dvh;border-radius:16px;isolation:isolate;overflow:hidden;background:var(--theme-bg2,#0c1018)}
.call-popup .call-workspace{height:100dvh;min-height:100dvh;max-height:100dvh;border:0;border-radius:0;box-shadow:none}
.call-topbar{position:relative;flex:0 0 auto;z-index:3;min-height:74px;display:flex;justify-content:space-between;gap:15px;align-items:center;padding:14px 24px;border:0;background:var(--theme-surface,#11151f)}
.call-topbar>div{min-width:0;display:flex;align-items:center;gap:12px}
.call-topbar h1{font-size:19px;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:65vw;margin:0}
.call-topbar .eyebrow{display:block;line-height:1.4;color:var(--theme-accent-text,#a6a7fc);font-size:10px;letter-spacing:.13em;font-weight:850}
.call-topbar small,.call-topbar #voice-state{display:block;font-size:12px;color:var(--theme-text,#b4b9c8)}
.call-back{display:flex;align-items:center;gap:8px;color:var(--theme-text,#ced2dc);text-decoration:none;padding:10px 13px;border:1px solid var(--theme-line,#343945);border-radius:10px;font-size:12px;font-weight:750;white-space:nowrap;background:var(--theme-surface2,#202631)}
.call-back:hover{background:var(--theme-surface3,#2c3442);color:var(--theme-text,#fff)}
.call-video-grid{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));align-items:stretch;grid-auto-rows:minmax(0,1fr);gap:10px;padding:14px;background:#0c1018;overflow:auto}
.call-placeholder.audio-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:100%;width:100%;padding:24px 16px;border-radius:16px;background:radial-gradient(ellipse at 50% 24%, var(--theme-surface3,#222943) 0%,var(--theme-surface2,#151b2b) 40%,var(--theme-bg2,#0d111a) 92%);border:1px solid var(--theme-line,#242b3e);text-align:center}
.call-stage-avatar{width:clamp(105px,19vh,165px);height:clamp(105px,19vh,165px);display:grid;place-items:center;border-radius:50%;border:5px solid var(--theme-accent,rgba(178,192,255,.16));background:linear-gradient(135deg,var(--theme-accent,#555cc6),var(--theme-surface3,#292f66));color:var(--theme-on-accent,#fff);font-size:clamp(50px,9vh,80px);font-weight:800;box-shadow:0 12px 50px #07081280}
.call-placeholder.audio-stage strong{font-size:clamp(22px,3.2vw,30px);line-height:1.2;color:var(--theme-text,#f6f7ff)}
.call-placeholder.audio-stage span{color:var(--theme-text,#b7bccc);font-size:13px}
.call-video-card{min-height:0;max-height:100%;border:1px solid var(--theme-line,#343948);border-radius:15px;overflow:hidden}
.call-video-card video{max-height:100%;width:100%;height:100%;object-fit:cover}
.call-shared-screens{flex:0 1 auto;min-height:0;max-height:45%;padding:0 14px 10px}
.call-shared-screens:not(:empty){overflow:auto}
.call-shared-screens .call-video-card{min-height:180px}
.call-participants{flex:0 0 auto;display:flex;justify-content:center;gap:9px;padding:10px 16px;border:0;background:var(--theme-surface,#111620);max-height:110px;overflow-x:auto}
.call-participants:empty{display:none}
.call-participants .voice-peer,.call-participants .peer{min-width:130px;max-width:240px;border-radius:11px;border:1px solid var(--theme-line,#2e3648);background:var(--theme-surface2,#1a2230);padding:9px 12px;font-size:12px}
.call-participants .voice-peer strong,.call-participants .peer strong{font-size:12px}
.call-media-status{flex:0 0 auto;margin:0;padding:10px 18px;border-top:1px solid var(--theme-line2,#36426a);background:var(--theme-surface2,#17243a);color:var(--theme-accent-text,#d5e0f9);font-size:12px;text-align:center}
.call-media-status.error{color:var(--theme-text,#ffd9d9);border-color:var(--theme-danger-border,#6a3640);background:var(--theme-surface3,#3d2029)}
.call-dock{flex:0 0 auto;display:flex;justify-content:center;align-items:center;gap:12px;min-height:98px;padding:16px 20px 20px;background:var(--theme-surface,#171c27);border-top:1px solid var(--theme-line,#282f3d);position:relative;z-index:4}
.call-control{--call-icon:unset;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:78px;min-height:72px;padding:9px 14px;border:1px solid var(--theme-line,#343d50);border-radius:15px;background:var(--theme-surface3,#2a3242);color:var(--theme-text,#f0f2f8);font-weight:700;font-size:12px;letter-spacing:0;white-space:nowrap;line-height:1.2;transition:background .15s ease,transform .15s ease}
.call-control::before{content:"";width:22px;height:22px;display:block;background:currentColor;-webkit-mask:var(--call-icon) center/contain no-repeat;mask:var(--call-icon) center/contain no-repeat}
.call-control:hover:not(:disabled){background:var(--theme-surface3,#3a465b);transform:translateY(-1px)}
.call-control.primary{background:var(--theme-accent,#4f56d9);border-color:var(--theme-accent,#6672eb)}
.call-control.primary:hover{background:var(--theme-accent,#6167ed)}
.call-control.danger{background:var(--theme-danger-fill,#ad3451);border-color:var(--theme-danger-border,#c74f66);color:var(--theme-on-danger,#fff)}
.call-control.danger:hover{background:var(--theme-danger-fill,#cb3f60)}
.call-control:disabled{opacity:.38}
.call-control:focus-visible,.call-back:focus-visible{outline:3px solid var(--theme-accent,#93a6ff);outline-offset:3px}
.call-workspace .compact-debug{flex:0 0 auto;border:0;padding:5px 14px;background:var(--theme-surface,#10151f)}
.call-workspace .compact-debug summary{padding:3px;font-size:10px;color:var(--theme-muted,#929baa)}
.call-workspace .compact-debug:not([open]){max-height:27px}
.call-workspace .compact-debug pre{max-height:120px;overflow:auto}
.call-remote-audio{width:0;height:0;overflow:hidden}
.call-participants:has(.voice-person){max-height:120px;justify-content:flex-start;scrollbar-width:thin}
.voice-person{flex:0 0 230px;display:flex;align-items:center;gap:10px;min-width:0;padding:10px 12px;border:2px solid transparent;border-radius:14px;background:var(--theme-surface2,#1a2230);transition:border-color .12s ease;position:relative}
.voice-person-avatar{flex:0 0 38px;width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:var(--theme-surface3,#30394e);color:var(--theme-text,#f2f5ff);font-size:17px;font-weight:750;box-shadow:0 0 0 2px var(--theme-line,#37435b)}
.voice-person.is-speaking{border-color:#43b581}
.voice-person.is-speaking .voice-person-avatar{box-shadow:0 0 0 2px #43b581}
.voice-person-details{flex:1;min-width:0}
.voice-person-name{display:block;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-person-state{display:block;color:var(--theme-muted,#bac4d5);font-size:11px;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.voice-person.is-speaking .voice-person-state{color:var(--theme-text,#e4fff1)}
.voice-speaking-indicator{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.voice-person-control{flex:0 0 30px;width:30px;height:34px;min-height:0;padding:0;border:0;border-radius:8px;background:transparent;color:var(--theme-muted,#c3ccdc);font-size:15px;letter-spacing:1px}
.voice-person-control:hover{background:var(--theme-surface3,#33415b);color:var(--theme-text,#fff)}
.voice-person-control:focus-visible,.voice-audio-dialog button:focus-visible,.voice-volume-slider:focus-visible,.voice-local-mute input:focus-visible{outline:3px solid var(--theme-accent,#93a6ff);outline-offset:3px}
.voice-person.is-local-muted .voice-person-avatar,.voice-person.is-self-muted .voice-person-avatar{opacity:.65}
.call-video-card.is-speaking{outline:3px solid #43b581;outline-offset:-3px}
.call-control[aria-pressed="true"]{background:var(--theme-danger-fill,#ad3451);color:var(--theme-on-danger,#fff)}
.voice-audio-dialog{box-sizing:border-box;width:min(360px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--theme-line,#3a455c);border-radius:18px;padding:22px;color:var(--theme-text,#f2f5ff);background:var(--theme-surface2,#1a2230);box-shadow:0 24px 90px #0008}
.voice-audio-dialog::backdrop{background:#020511a6;backdrop-filter:blur(5px)}
.voice-audio-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:23px}
.voice-audio-dialog h2{font-size:18px;margin:0;overflow-wrap:anywhere}
.voice-audio-close{border:0;background:transparent;color:var(--theme-muted,#c3ccdc);width:34px;height:34px;min-height:0;padding:0;font-size:24px;border-radius:8px}
.voice-volume-label{display:block;font-size:13px;font-weight:700}
.voice-volume-value{float:right;color:var(--theme-accent-text,#b8bcff);font-variant-numeric:tabular-nums}
.voice-volume-slider{display:block;width:100%;margin:15px 0 23px;padding:0;accent-color:var(--theme-accent,#8288fc);height:24px;cursor:pointer}
.voice-local-mute{display:flex;align-items:center;gap:10px;font-weight:650;font-size:13px;cursor:pointer}
.voice-local-mute input{width:18px;height:18px;accent-color:var(--theme-accent,#8288fc)}
.voice-audio-note{font-size:12px;line-height:1.5;color:var(--theme-muted,#bbc5d8);margin:15px 0}
.voice-audio-reset{display:block;width:100%;border:1px solid var(--theme-line,#3a455c);background:var(--theme-surface3,#30394e);color:var(--theme-text,#fff);border-radius:9px;min-height:40px;padding:9px 12px;font-size:12px;font-weight:700}
[data-voice-deafen]::before,#call-deafen::before,#voice-deafen::before,#group-call-deafen::before{--call-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14v-3a9 9 0 0 1 18 0v3M3 13h3v8H3zM18 13h3v8h-3z'/%3E%3C/svg%3E")}
@media(max-width:720px){.call-participants:has(.voice-person){max-height:90px;padding:7px 8px}.voice-person{flex-basis:200px;padding:7px 9px;gap:8px}.voice-person-avatar{width:32px;height:32px;flex-basis:32px;font-size:15px}.voice-audio-dialog{padding:18px}}
@media(prefers-reduced-motion:reduce){.voice-person{transition:none}}
@media(max-width:720px){
 body.call-popup .ambient,body.call-popup .topbar,body.call-popup .mobile-tabbar{display:none!important}
 body.call-popup{overflow:hidden}
 .call-popup .page.call-window-page{height:100dvh;min-height:0}
 .call-workspace,.call-popup .call-workspace{height:100dvh;min-height:0;max-height:100dvh;border-radius:0}
 .call-topbar{min-height:calc(65px + env(safe-area-inset-top));padding:calc(10px + env(safe-area-inset-top)) calc(15px + env(safe-area-inset-right)) 10px calc(15px + env(safe-area-inset-left));background:var(--theme-surface,#111522)}
 .call-topbar h1{font-size:16px;max-width:55vw}
 .call-topbar .eyebrow{font-size:9px}
 .call-back{border:0;background:var(--theme-surface3,#252e3d);border-radius:50%;width:39px;height:39px;justify-content:center;font-size:23px;padding:0}
 .call-back span{display:none}
 .call-video-grid{padding:8px;gap:7px;grid-template-columns:1fr;grid-auto-rows:minmax(0,1fr);overflow:auto}
 .call-placeholder.audio-stage{height:100%;min-height:0;border:0;border-radius:15px;padding:14px 10px;gap:9px}
 .call-stage-avatar{width:clamp(100px,19vh,170px);height:clamp(100px,19vh,170px)}
 .call-placeholder.audio-stage strong{font-size:23px}
 .call-placeholder.audio-stage span{font-size:13px}
 .call-shared-screens{max-height:40%;padding:0 8px 6px}
 .call-participants{padding:6px 8px;justify-content:flex-start;max-height:72px}
 .call-participants .voice-peer,.call-participants .peer{min-width:112px;padding:7px 9px}
 .call-media-status{padding:8px 12px;font-size:11px}
 .call-dock{padding:12px max(8px,env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));gap:8px;min-height:102px;flex-wrap:wrap;align-content:center}
 .call-control{min-width:0;flex:0 1 70px;min-height:68px;border-radius:14px;padding:8px 6px;font-size:11px;gap:7px}
 .call-control::before{width:22px;height:22px}
 .call-video-card{min-height:0;max-height:none}
 .call-workspace .compact-debug{display:none}
}
@media(max-width:390px){.call-dock{gap:6px}.call-control{flex-basis:61px;font-size:10px}.call-control::before{width:20px;height:20px}}
@media(max-height:520px) and (orientation:landscape){.call-stage-avatar{width:65px;height:65px;font-size:36px}.call-dock{min-height:70px;padding:6px 10px}.call-control{min-height:55px}.call-topbar{min-height:50px;padding-top:6px;padding-bottom:6px}.call-placeholder.audio-stage{gap:4px}}
@media(prefers-reduced-motion:reduce){.call-control{transition:none}}

#call-mute::before,#voice-mute::before,#group-call-mute::before,#call-connect::before{--call-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%202a3%203%200%200%200-3%203v7a3%203%200%200%200%206%200V5a3%203%200%200%200-3-3Z%22%2F%3E%3Cpath%20d%3D%22M19%2010v2a7%207%200%200%201-14%200v-2M12%2019v3M8%2022h8%22%2F%3E%3C%2Fsvg%3E")}

#call-camera::before,#voice-camera::before,#group-call-camera::before{--call-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%222%22%20y%3D%225%22%20width%3D%2215%22%20height%3D%2214%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22m17%2010%205-3v10l-5-3%22%2F%3E%3C%2Fsvg%3E")}

#call-share::before,#voice-share::before,#group-call-share::before{--call-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%222%22%20y%3D%223%22%20width%3D%2220%22%20height%3D%2215%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M8%2022h8M12%2018v4M12%2014V7m-4%204%204-4%204%204%22%2F%3E%3C%2Fsvg%3E")}

#call-hangup::before,#voice-leave::before,#group-call-leave::before,#group-call-end::before,#call-decline::before,#call-cancel::before{--call-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M21%2015c-5-4-13-4-18%200v4l5-2%201-3a13%2013%200%200%201%206%200l1%203%205%202v-4Z%22%2F%3E%3C%2Fsvg%3E")}

#call-accept::before,#voice-join::before,#group-call-join::before{--call-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M22%2016.92v3a2%202%200%200%201-2.18%202A19.8%2019.8%200%200%201%202.09%204.18%202%202%200%200%201%204.08%202h3a2%202%200%200%201%202%201.72l.45%202.81a2%202%200%200%201-.57%201.72L7.09%2010.1a16%2016%200%200%200%206.81%206.81l1.85-1.87a2%202%200%200%201%201.72-.57l2.81.45A2%202%200%200%201%2022%2016.92Z%22%2F%3E%3C%2Fsvg%3E")}

#call-audio-enable::before,#voice-audio-enable::before,#group-call-audio-enable::before{--call-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22m11%205-6%204H2v6h3l6%204V5ZM15.54%208.46a5%205%200%200%201%200%207.07M19.07%204.93a10%2010%200%200%201%200%2014.14%22%2F%3E%3C%2Fsvg%3E")}

.call-popout-closed{position:fixed;inset:0;z-index:99999;background:var(--theme-bg2,#101318);color:var(--theme-text,#e8ecf6);display:flex;flex-direction:column;align-items:center;justify-content:center;padding:30px;gap:18px;text-align:center;font:16px system-ui;}
.call-popout-closed strong{font-size:24px}.call-popout-closed p{max-width:400px;line-height:1.5}.call-popout-closed a{color:var(--theme-accent-text,#a0b7ff)}.call-popout-closed button{border:1px solid var(--theme-line2,#616f91);background:var(--theme-surface3,#303d5e);color:var(--theme-text,white);padding:12px 20px;border-radius:9px;cursor:pointer}
