/* Hide outgoing call actions while the cabinet offers messaging only. */
html[data-mb-hide-call-actions] :is(#mb-work-call, #mb-direct-call, #mb-call-open, [data-group-call]) {
    display: none !important;
}
#mb-voice,#mb-voice-contacts,#mb-call-open {
    --call-bg:#1b1f1c; --call-surface:#282e29; --call-ink:#edf0e8; --call-muted:#b0b9ad;
    --call-line:#536050; --call-action:#cfed99; --call-on-action:#172310;
    --call-end:#ffb4ab; --call-on-end:#4a1717;
    font:400 1rem/1.45 MaobvenGolos,system-ui,sans-serif; color-scheme:dark;
}
:is(.cpd-theme-light,.mx_Theme_light,.mx_Theme_light-custom) :is(#mb-voice,#mb-voice-contacts,#mb-call-open) {
    --call-bg:#fff; --call-surface:#f2f4ef; --call-ink:#1d271b; --call-muted:#53634e;
    --call-line:#76866f; --call-action:#385f25; --call-on-action:#fff;
    --call-end:#9f302c; --call-on-end:#fff; color-scheme:light;
}
#mb-call-open,#mb-voice button,#mb-voice-contacts :is(button,input) {
    box-sizing:border-box; min-width:44px; min-height:44px; border:1px solid var(--call-line);
    border-radius:.65rem; padding:.55rem .8rem; font:inherit; line-height:1.25;
    background:var(--call-surface); color:var(--call-ink);
}
#mb-call-open,#mb-voice button,#mb-voice-contacts button {cursor:pointer}
#mb-call-open {margin:4px 12px;text-align:start}
#mb-voice {
    position:fixed; z-index:1300; inset-inline-end:max(.75rem,env(safe-area-inset-right));
    bottom:max(.75rem,env(safe-area-inset-bottom)); width:min(26rem,calc(100% - 1.5rem));
    color:var(--call-ink); pointer-events:none;
}
#mb-voice > :not([hidden]),#mb-voice-contacts {pointer-events:auto}
#mb-call-controls:not([hidden]),#mb-voice > p:not(:empty),#mb-voice-contacts {
    box-sizing:border-box; border:1px solid var(--call-line); border-radius:1rem;
    box-shadow:0 .6rem 2.4rem #10181144; background:var(--call-bg); color:var(--call-ink); padding:1rem;
}
#mb-call-controls:not([hidden]) {
    display:flex; flex-direction:column; gap:.75rem;
    max-height:calc(100vh - 1.5rem); max-height:calc(100dvh - 1.5rem);
    overflow:auto; scrollbar-width:thin;
}
#mb-call-controls header {display:flex;align-items:start;gap:.5rem;justify-content:space-between}
#mb-call-controls header > div {min-width:0}
#mb-call-controls h2,#mb-voice-contacts h2 {margin:0;font-size:1.23rem;font-weight:650;line-height:1.25;overflow-wrap:anywhere}
#mb-call-controls p {margin:0;font-size:.9rem;color:var(--call-muted)}
#mb-call-controls header p {margin:0 0 .2rem}
#mb-call-participants:not([hidden]) {
    display:grid;grid-template-columns:repeat(auto-fit,minmax(min(8rem,100%),1fr));gap:.45rem;
    margin:0;padding:0;overflow:auto;list-style:none;min-height:0;scrollbar-width:thin;
}
#mb-call-participants li {
    display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:.55rem;align-content:center;
    align-items:center;padding:.65rem;border-radius:.7rem;background:var(--call-surface);overflow-wrap:anywhere;
}
.mb-call-avatar {
    display:grid;grid-column:1;grid-row:1/span 2;place-items:center;width:2.2rem;height:2.2rem;
    border-radius:50%;background:var(--call-action);color:var(--call-on-action);font-weight:650;
}
#mb-call-participants small {grid-column:2;color:var(--call-muted)}
.mb-call-actions {display:flex;align-items:stretch;flex-wrap:wrap;gap:.4rem}
#mb-call-controls .mb-call-mic {color:var(--call-on-action);background:var(--call-action);border-color:transparent}
#mb-call-controls .mb-call-mic[aria-pressed="true"] {background:var(--call-surface);color:var(--call-ink);border-color:var(--call-line)}
#mb-call-controls .mb-call-end {background:var(--call-end);color:var(--call-on-end);border-color:transparent;margin-inline-start:auto}
#mb-voice button:disabled {cursor:wait}
#mb-voice :focus-visible,#mb-voice-contacts :focus-visible,#mb-call-open:focus-visible {outline:3px solid var(--call-action);outline-offset:2px}
#mb-voice > p {margin:.4rem 0 0}
#mb-voice > p:empty {display:none}
#mb-voice-contacts {width:min(28rem,calc(100% - 1.5rem));max-height:85vh}
#mb-voice-contacts::backdrop {background:#111911ad}
#mb-voice-contacts input {width:100%;margin:.8rem 0}
#mb-voice-contacts>div {display:grid;max-height:42vh;overflow:auto;gap:.35rem;margin-bottom:.75rem}
#mb-voice-contacts>div button {text-align:start;overflow-wrap:anywhere}
