
/* MilanSaathi — Batch 22 in-page Audio Call dialog */
body.ms-call-dialog-open{overflow:hidden!important}

.ms22-call-backdrop{
    position:fixed;
    inset:0;
    z-index:12000;
    display:grid;
    place-items:center;
    padding:20px;
    background:rgba(28,8,16,.58);
    backdrop-filter:blur(11px);
}
.ms22-call-backdrop[hidden]{display:none!important}

.ms22-call-card{
    position:relative;
    width:min(470px,calc(100vw - 28px));
    max-height:calc(100vh - 28px);
    overflow:auto;
    padding:27px 26px 22px;
    border:1px solid rgba(215,172,65,.48);
    border-radius:28px;
    background:
      radial-gradient(circle at 50% -5%,rgba(255,225,157,.52),transparent 36%),
      linear-gradient(180deg,#fffdf8,#fff6eb);
    box-shadow:0 34px 95px rgba(52,4,24,.36);
    color:#39141f;
    text-align:center;
}

.ms22-call-close{
    position:absolute;
    right:14px;
    top:13px;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border:1px solid #e1cbd2;
    border-radius:50%;
    background:#fff;
    color:#7a1537;
    font-size:21px;
    cursor:pointer;
}

.ms22-call-eyebrow{
    color:#9d7430;
    font-size:9px;
    font-weight:900;
    letter-spacing:.17em;
}
.ms22-call-rings{
    position:relative;
    width:142px;
    height:142px;
    margin:13px auto 10px;
    display:grid;
    place-items:center;
}
.ms22-call-rings>i{
    position:absolute;
    inset:14px;
    border:1px solid rgba(139,26,61,.25);
    border-radius:50%;
    animation:ms22CallRing 1.9s ease-out infinite;
}
.ms22-call-rings>i:nth-child(2){inset:0;animation-delay:.42s}
.ms22-call-rings img{
    position:relative;
    z-index:2;
    width:102px;
    height:102px;
    border-radius:50%;
    object-fit:cover;
    border:4px solid #fff;
    background:#f5e8ed;
    box-shadow:0 15px 38px rgba(83,18,42,.2);
}
.ms22-call-card h2{
    margin:3px 0 0;
    color:#5e1730;
    font-size:27px;
    line-height:1.12;
}
.ms22-call-status{
    min-height:20px;
    margin:7px 0 0;
    color:#7c6870;
    font-size:12px;
    font-weight:800;
}
.ms22-call-timer{
    width:max-content;
    min-width:88px;
    margin:12px auto;
    padding:7px 15px;
    border:1px solid #e3cfa6;
    border-radius:999px;
    background:#fff;
    color:#6d1834;
    font-size:13px;
    font-weight:900;
    letter-spacing:.07em;
}
.ms22-call-primary-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
    margin-top:13px;
}
.ms22-call-primary-actions.one{grid-template-columns:1fr}
.ms22-call-btn{
    min-height:45px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:0 14px;
    border:0;
    border-radius:14px;
    font-size:12px;
    font-weight:900;
    cursor:pointer;
}
.ms22-call-btn.start,.ms22-call-btn.accept{
    color:#fff;
    background:linear-gradient(135deg,#6c1733,#a82650);
    box-shadow:0 12px 25px rgba(112,20,55,.19);
}
.ms22-call-btn.decline,.ms22-call-btn.end{
    color:#fff;
    background:linear-gradient(135deg,#a21837,#d64955);
}
.ms22-call-controls{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:9px;
    margin-top:13px;
}
.ms22-call-control{
    min-height:67px;
    display:grid;
    place-items:center;
    align-content:center;
    gap:5px;
    padding:8px 6px;
    border:1px solid #eadce0;
    border-radius:15px;
    background:#fff;
    color:#65434e;
    cursor:pointer;
}
.ms22-call-control b{font-size:11px}
.ms22-call-control small{font-size:8px;color:#9b838c}
.ms22-call-control.is-on{
    border-color:#a7697c;
    background:#f8edf1;
    color:#741d3c;
}
.ms22-call-control:disabled{opacity:.45;cursor:not-allowed}
.ms22-call-output{
    grid-column:1/-1;
    min-height:38px;
    width:100%;
    padding:0 10px;
    border:1px solid #e4d4d9;
    border-radius:11px;
    background:#fff;
    color:#5c3a46;
    font-size:10px;
}
.ms22-call-output[hidden]{display:none!important}
.ms22-call-audio{display:none}
.ms22-call-note{
    display:block;
    margin-top:13px;
    color:#958087;
    font-size:9px;
    line-height:1.5;
}
.ms22-call-error{
    margin-top:10px;
    padding:9px 11px;
    border-radius:11px;
    background:#fff0f1;
    color:#a02b40;
    font-size:10px;
    font-weight:800;
}
.ms22-call-error[hidden]{display:none!important}
.ms22-call-card.is-connected .ms22-call-rings>i{border-color:rgba(34,150,85,.28)}
.ms22-call-card.is-connected .ms22-call-status{color:#2d8057}
.ms22-call-card.is-ended .ms22-call-rings>i{animation:none;opacity:.15}

@keyframes ms22CallRing{
    0%{transform:scale(.82);opacity:.72}
    70%{transform:scale(1.14);opacity:.08}
    100%{transform:scale(1.18);opacity:0}
}
@media(max-width:560px){
    .ms22-call-card{padding:24px 17px 18px;border-radius:22px}
    .ms22-call-controls{grid-template-columns:repeat(2,1fr)}
    .ms22-call-output{grid-column:1/-1}
}


/* ==========================================================
   Batch 22 Correction 4 — impossible-to-fail Call entry dialog
   ========================================================== */

.ms-call-fallback-backdrop{
    position:fixed;
    inset:0;
    z-index:16000;
    display:none;
    place-items:center;
    padding:20px;
    background:rgba(31,7,16,.62);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}

.ms-call-fallback-backdrop:target{
    display:grid!important;
}

.ms-call-fallback-card{
    position:relative;
    width:min(520px,calc(100vw - 30px));
    max-height:calc(100vh - 32px);
    overflow:auto;
    padding:26px 24px 22px;
    border:1px solid rgba(211,171,63,.5);
    border-radius:26px;
    background:
      radial-gradient(circle at 50% -7%,rgba(255,224,150,.48),transparent 37%),
      linear-gradient(180deg,#fffdf8,#fff6eb);
    box-shadow:0 36px 90px rgba(54,4,25,.38);
    color:#411624;
}

.ms-call-fallback-close{
    position:absolute;
    right:14px;
    top:13px;
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border:1px solid #e4d1d7;
    border-radius:50%;
    background:#fff;
    color:#7b193a;
    font-size:21px;
    text-decoration:none;
}

.ms-call-fallback-eyebrow{
    display:block;
    color:#9d7731;
    font-size:9px;
    font-weight:900;
    letter-spacing:.17em;
}

.ms-call-fallback-person{
    display:grid;
    grid-template-columns:76px minmax(0,1fr);
    gap:14px;
    align-items:center;
    margin:13px 0 17px;
    text-align:left;
}

.ms-call-fallback-person img{
    width:76px;
    height:76px;
    border-radius:50%;
    object-fit:cover;
    border:3px solid #fff;
    box-shadow:0 10px 25px rgba(90,20,47,.16);
}

.ms-call-fallback-person h2{
    margin:0;
    color:#5c1730;
    font-size:24px;
}

.ms-call-fallback-person p{
    margin:5px 0 0;
    color:#88747b;
    font-size:10px;
    line-height:1.45;
}

.ms-call-debug-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
}

.ms-call-debug-grid>div{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    min-height:42px;
    padding:9px 11px;
    border:1px solid #eadde1;
    border-radius:12px;
    background:#fff;
}

.ms-call-debug-grid span{
    color:#8b747c;
    font-size:9px;
    font-weight:800;
}

.ms-call-debug-grid b{
    font-size:9px;
    font-weight:900;
}

.ms-call-debug-grid b.ok{color:#287353}
.ms-call-debug-grid b.warn{color:#9b6b1d}
.ms-call-debug-grid b.bad{color:#a53648}

.ms-call-debug-error{
    display:grid;
    gap:4px;
    margin-top:10px;
    padding:10px 12px;
    border-radius:12px;
    background:#fff0f1;
    color:#a33144;
    text-align:left;
}

.ms-call-debug-error b{font-size:10px}
.ms-call-debug-error span{font-size:9px;line-height:1.4}

.ms-call-browser-status{
    display:flex;
    gap:6px;
    align-items:center;
    margin:11px 0;
    padding:9px 11px;
    border:1px solid #e7d9dd;
    border-radius:11px;
    background:#fff;
    color:#7e6870;
    font-size:9px;
    text-align:left;
}

.ms-call-browser-status.ok{border-color:#cfe7d8;background:#f4fbf7;color:#2f7657}
.ms-call-browser-status.bad{border-color:#efcbd1;background:#fff3f4;color:#a13044}
.ms-call-browser-status.warn{border-color:#ead8ad;background:#fffaf0;color:#956a20}

.ms-call-fallback-start{
    width:100%;
    min-height:46px;
    border:0;
    border-radius:14px;
    background:linear-gradient(135deg,#6e1734,#a72850);
    color:#fff;
    font-size:12px;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 12px 26px rgba(112,23,55,.2);
}

.ms-call-fallback-start:disabled{
    background:#d9cdd1;
    color:#8f7d84;
    box-shadow:none;
    cursor:not-allowed;
}

.ms-call-fallback-note{
    display:block;
    margin-top:10px;
    color:#97828a;
    font-size:9px;
    line-height:1.45;
    text-align:center;
}

@media(max-width:560px){
    .ms-call-debug-grid{grid-template-columns:1fr}
    .ms-call-fallback-card{padding:24px 17px 19px}
}


/* Batch 22 Correction 5 — physically isolated Chat Call control */
body.ms-app[data-page="messages"] .ms-chat-header-tools{
  position:relative!important;
  z-index:300!important;
  pointer-events:auto!important;
}
body.ms-app[data-page="messages"] .ms-call-hard-trigger{
  position:relative!important;
  z-index:500!important;
  pointer-events:auto!important;
  touch-action:manipulation!important;
  cursor:pointer!important;
}
body.ms-app[data-page="messages"] .ms-chat-header-icon.ms-call-hard-trigger{
  display:grid!important;
  place-items:center!important;
  border:0!important;
}
body.ms-app[data-page="messages"] .mscf-contact-strip .ms-call-hard-trigger--strip{
  appearance:none!important;
  -webkit-appearance:none!important;
  font:inherit!important;
  background:transparent!important;
  color:inherit!important;
  border:0!important;
}
.ms-call-fallback-backdrop.is-hard-open{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}


/* ==========================================================
   Batch 22 Correction 6 — 2x Call dialog + matched contact UI
   ========================================================== */

/* Diagnostic/pre-call shell: approximately twice previous visual footprint. */
.ms-call-fallback-card{
    width:min(920px,calc(100vw - 52px))!important;
    min-height:620px!important;
    max-height:calc(100vh - 36px)!important;
    padding:42px 44px 34px!important;
    border-radius:34px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
}

.ms-call-fallback-eyebrow{
    font-size:11px!important;
    letter-spacing:.19em!important;
    margin-bottom:8px!important;
}

.ms-call-fallback-person{
    grid-template-columns:150px minmax(0,1fr)!important;
    gap:28px!important;
    margin:16px 0 26px!important;
    align-items:center!important;
}

.ms-call-fallback-person img{
    width:150px!important;
    height:150px!important;
    border-width:5px!important;
    box-shadow:0 20px 48px rgba(90,20,47,.19)!important;
}

.ms-call-fallback-person h2{
    font-size:38px!important;
    line-height:1.08!important;
}

.ms-call-fallback-person p{
    margin-top:9px!important;
    max-width:570px!important;
    font-size:13px!important;
    line-height:1.55!important;
}

.ms-call-debug-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
}

.ms-call-debug-grid>div{
    min-height:62px!important;
    padding:13px 15px!important;
    border-radius:15px!important;
}

.ms-call-debug-grid span,
.ms-call-debug-grid b{
    font-size:11px!important;
}

.ms-call-debug-error,
.ms-call-browser-status{
    margin-top:14px!important;
    padding:13px 15px!important;
    border-radius:14px!important;
    font-size:11px!important;
}

.ms-call-fallback-start{
    min-height:58px!important;
    margin-top:14px!important;
    border-radius:17px!important;
    font-size:15px!important;
    gap:9px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
}

.ms-call-fallback-start .ms-icon{
    width:19px!important;
    height:19px!important;
}

.ms-call-fallback-note{
    font-size:10px!important;
    margin-top:13px!important;
}

/* Full live calling screen is also much larger. */
.ms22-call-card{
    width:min(780px,calc(100vw - 40px))!important;
    min-height:650px!important;
    padding:42px 46px 34px!important;
    border-radius:36px!important;
    display:flex!important;
    flex-direction:column!important;
    justify-content:center!important;
}

.ms22-call-rings{
    width:220px!important;
    height:220px!important;
    margin:17px auto 15px!important;
}

.ms22-call-rings img{
    width:154px!important;
    height:154px!important;
    border-width:5px!important;
}

.ms22-call-card h2{
    font-size:38px!important;
}

.ms22-call-status{
    font-size:14px!important;
    margin-top:10px!important;
}

.ms22-call-timer{
    min-width:120px!important;
    padding:10px 22px!important;
    font-size:16px!important;
    margin:16px auto!important;
}

.ms22-call-primary-actions{
    gap:13px!important;
    margin-top:17px!important;
}

.ms22-call-btn{
    min-height:58px!important;
    border-radius:17px!important;
    font-size:14px!important;
}

.ms22-call-controls{
    grid-template-columns:repeat(3,1fr)!important;
    gap:13px!important;
    margin-top:18px!important;
}

.ms22-call-control{
    min-height:92px!important;
    border-radius:18px!important;
}

.ms22-call-control b{font-size:13px!important}
.ms22-call-control small{font-size:10px!important}

.ms22-call-note{
    margin-top:18px!important;
    font-size:11px!important;
}

/*
 * CONTACT STRIP PARITY
 * Call must look exactly like WhatsApp and Instagram rather than a plain
 * transparent button introduced by the hard-trigger diagnostic patch.
 */
body.ms-app[data-page="messages"] .mscf-contact-strip .ms-call-hard-trigger--strip,
body.ms-app[data-page="messages"] .ms-chat-contact-strip .ms-call-hard-trigger--strip{
    min-height:34px!important;
    padding:0 12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    border:1px solid #ead8df!important;
    border-radius:9px!important;
    background:#fff!important;
    color:#751839!important;
    font:inherit!important;
    font-size:10px!important;
    font-weight:850!important;
    line-height:1!important;
    box-shadow:none!important;
    text-decoration:none!important;
    cursor:pointer!important;
}

body.ms-app[data-page="messages"] .mscf-contact-strip .ms-call-hard-trigger--strip:hover,
body.ms-app[data-page="messages"] .ms-chat-contact-strip .ms-call-hard-trigger--strip:hover{
    border-color:#d8b9c5!important;
    background:#fff7f9!important;
    color:#64132f!important;
}

body.ms-app[data-page="messages"] .mscf-contact-strip .ms-call-hard-trigger--strip .ms-icon,
body.ms-app[data-page="messages"] .ms-chat-contact-strip .ms-call-hard-trigger--strip .ms-icon{
    width:14px!important;
    height:14px!important;
}

/* Loading indicator for direct Start button. */
.ms-call-button-spinner{
    width:17px;
    height:17px;
    border:2px solid rgba(255,255,255,.38);
    border-top-color:#fff;
    border-radius:50%;
    animation:msCallButtonSpin .7s linear infinite;
}
@keyframes msCallButtonSpin{to{transform:rotate(360deg)}}

@media(max-width:760px){
    .ms-call-fallback-card,
    .ms22-call-card{
        width:calc(100vw - 20px)!important;
        min-height:0!important;
        padding:26px 18px 22px!important;
        border-radius:24px!important;
    }

    .ms-call-fallback-person{
        grid-template-columns:92px minmax(0,1fr)!important;
        gap:15px!important;
    }

    .ms-call-fallback-person img{
        width:92px!important;
        height:92px!important;
    }

    .ms-call-fallback-person h2,
    .ms22-call-card h2{
        font-size:28px!important;
    }

    .ms-call-debug-grid{
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }

    .ms22-call-rings{
        width:160px!important;
        height:160px!important;
    }

    .ms22-call-rings img{
        width:112px!important;
        height:112px!important;
    }

    .ms22-call-controls{
        grid-template-columns:repeat(2,1fr)!important;
    }
}


/* ==========================================================
   Batch 22 Correction 7 — realistic call UI + receiver pickup
   ========================================================== */

/* Consumer call dialog: no technical/debug presentation. */
.ms-call-consumer-card{
    width:min(760px,calc(100vw - 42px))!important;
    min-height:620px!important;
    padding:46px 52px 38px!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    text-align:center!important;
}

.ms-call-consumer-card .ms-call-debug-grid,
.ms-call-consumer-card .ms-call-debug-error,
.ms-call-consumer-card .ms-call-browser-status{
    display:none!important;
}

.ms-call-consumer-avatar{
    position:relative;
    width:240px;
    height:240px;
    display:grid;
    place-items:center;
    margin:18px auto 12px;
}

.ms-call-consumer-avatar>span{
    position:absolute;
    inset:25px;
    border:1px solid rgba(126,27,59,.23);
    border-radius:50%;
    animation:msConsumerCallRing 1.9s ease-out infinite;
}

.ms-call-consumer-avatar>span:nth-child(2){
    inset:5px;
    animation-delay:.44s;
}

.ms-call-consumer-avatar img{
    position:relative!important;
    z-index:2!important;
    width:170px!important;
    height:170px!important;
    border:6px solid #fff!important;
    border-radius:50%!important;
    object-fit:cover!important;
    box-shadow:0 22px 55px rgba(80,13,40,.22)!important;
}

.ms-call-consumer-card h2{
    margin:0!important;
    color:#5c1730!important;
    font-size:40px!important;
    line-height:1.06!important;
}

.ms-call-consumer-status{
    margin:9px 0 0!important;
    color:#806b73!important;
    font-size:15px!important;
    font-weight:750!important;
}

.ms-call-consumer-timer{
    min-width:108px;
    margin:17px auto 18px;
    padding:9px 20px;
    border:1px solid #ead8bd;
    border-radius:999px;
    background:#fff;
    color:#6a1b36;
    font-size:15px;
    font-weight:900;
    letter-spacing:.08em;
}

.ms-call-friendly-error{
    width:min(520px,100%);
    margin:0 auto 14px;
    padding:12px 15px;
    border:1px solid #efcbd3;
    border-radius:13px;
    background:#fff3f4;
    color:#a13246;
    font-size:11px;
    font-weight:800;
}

.ms-call-friendly-error[hidden]{display:none!important}

/* Profile Detail Call is a button but retains the premium contact appearance. */
body.ms-app .ms-social-premium-btn.ms-social-call.ms-call-hard-trigger{
    appearance:none!important;
    -webkit-appearance:none!important;
    font:inherit!important;
    cursor:pointer!important;
    pointer-events:auto!important;
}

/* Receiver-side incoming call UI available on every signed-in page. */
body.ms-incoming-call-open{overflow:hidden!important}

.ms-incoming-call-backdrop{
    position:fixed;
    inset:0;
    z-index:19000;
    display:grid;
    place-items:center;
    padding:20px;
    background:rgba(27,7,15,.66);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}

.ms-incoming-call-backdrop[hidden]{display:none!important}

.ms-incoming-call-card{
    width:min(650px,calc(100vw - 32px));
    min-height:600px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    padding:38px 42px 34px;
    border:1px solid rgba(215,174,67,.5);
    border-radius:34px;
    background:
      radial-gradient(circle at 50% -8%,rgba(255,224,150,.5),transparent 37%),
      linear-gradient(180deg,#fffdf8,#fff6eb);
    box-shadow:0 40px 105px rgba(57,3,25,.43);
    text-align:center;
    color:#451625;
}

.ms-incoming-eyebrow{
    color:#a07731;
    font-size:10px;
    font-weight:900;
    letter-spacing:.18em;
}

.ms-incoming-rings{
    position:relative;
    width:250px;
    height:250px;
    display:grid;
    place-items:center;
    margin:20px auto 15px;
}

.ms-incoming-rings i{
    position:absolute;
    inset:25px;
    border:1px solid rgba(130,26,61,.28);
    border-radius:50%;
    animation:msIncomingCallRing 1.8s ease-out infinite;
}

.ms-incoming-rings i:nth-child(2){
    inset:5px;
    animation-delay:.42s;
}

.ms-incoming-rings img{
    position:relative;
    z-index:2;
    width:176px;
    height:176px;
    border-radius:50%;
    object-fit:cover;
    border:6px solid #fff;
    box-shadow:0 22px 55px rgba(80,13,40,.22);
}

.ms-incoming-call-card h2{
    margin:0;
    color:#5c1730;
    font-size:38px;
    line-height:1.08;
}

.ms-incoming-call-card>p{
    margin:9px 0 0;
    color:#806b73;
    font-size:15px;
    font-weight:800;
}

.ms-incoming-actions{
    width:min(430px,100%);
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    margin-top:30px;
}

.ms-incoming-actions button{
    min-height:62px;
    border:0;
    border-radius:18px;
    font-size:14px;
    font-weight:900;
    cursor:pointer;
}

.ms-incoming-decline{
    color:#fff;
    background:linear-gradient(135deg,#a11c39,#dc4756);
    box-shadow:0 14px 30px rgba(176,31,61,.2);
}

.ms-incoming-accept{
    color:#fff;
    background:linear-gradient(135deg,#25744c,#3ba66d);
    box-shadow:0 14px 30px rgba(36,128,81,.2);
}

.ms-incoming-call-card>small{
    margin-top:18px;
    color:#98838a;
    font-size:10px;
}

@keyframes msConsumerCallRing{
    0%{transform:scale(.84);opacity:.68}
    70%{transform:scale(1.12);opacity:.08}
    100%{transform:scale(1.16);opacity:0}
}

@keyframes msIncomingCallRing{
    0%{transform:scale(.82);opacity:.72}
    70%{transform:scale(1.14);opacity:.08}
    100%{transform:scale(1.18);opacity:0}
}

@media(max-width:700px){
    .ms-call-consumer-card,
    .ms-incoming-call-card{
        width:calc(100vw - 20px)!important;
        min-height:0!important;
        padding:28px 18px 23px!important;
        border-radius:25px!important;
    }

    .ms-call-consumer-avatar,
    .ms-incoming-rings{
        width:185px!important;
        height:185px!important;
    }

    .ms-call-consumer-avatar img,
    .ms-incoming-rings img{
        width:128px!important;
        height:128px!important;
    }

    .ms-call-consumer-card h2,
    .ms-incoming-call-card h2{
        font-size:30px!important;
    }

    .ms-incoming-actions{gap:12px!important}
}


/* ==========================================================
   Batch 22 Correction 8 — direct Start + true full-screen overlay
   ========================================================== */

/*
 * Profile Detail uses several high stacking contexts. Make every Call layer
 * live at the highest application level so the profile photo/card can never
 * render above the call backdrop.
 */
.ms-call-fallback-backdrop,
.ms22-call-backdrop,
.ms-incoming-call-backdrop{
    z-index:2147483000!important;
    isolation:isolate!important;
}

body.ms-app:has(.ms-call-fallback-backdrop.is-hard-open) .ms-sidebar,
body.ms-app:has(.ms-call-fallback-backdrop.is-hard-open) .ms-topbar,
body.ms-app:has(.ms-call-fallback-backdrop.is-hard-open) .ms-comm-rail,
body.ms-app:has(.ms-call-fallback-backdrop.is-hard-open) .ms-detail-photo-card,
body.ms-app:has(.ms-call-fallback-backdrop.is-hard-open) .ms-profile-detail-hero,
body.ms-app:has(.ms-call-fallback-backdrop.is-hard-open) .ms-detail-layout{
    z-index:auto!important;
}

/* Hard-open fallback must cover the entire viewport and sit above profile hero. */
.ms-call-fallback-backdrop.is-hard-open{
    position:fixed!important;
    inset:0!important;
    display:grid!important;
    width:100vw!important;
    height:100vh!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    transform:none!important;
    overflow:auto!important;
    pointer-events:auto!important;
}

/* Full live call dialog gets same absolute priority. */
.ms22-call-backdrop:not([hidden]){
    position:fixed!important;
    inset:0!important;
    display:grid!important;
}

/* Prevent profile cards/hero transforms from creating visible spill above modal. */
body.ms-app .ms-call-fallback-backdrop.is-hard-open ~ *,
body.ms-app .ms22-call-backdrop:not([hidden]) ~ *{
    isolation:auto!important;
}

/* Start button always clickable over its own card. */
.ms-call-fallback-start{
    position:relative!important;
    z-index:50!important;
    pointer-events:auto!important;
    cursor:pointer!important;
}


/* Live Fix 10: body-mounted call overlays always outrank app content. */
body > .ms-call-fallback-backdrop.is-hard-open,
body > .ms22-call-backdrop:not([hidden]),
body > .ms-incoming-call-backdrop:not([hidden]){
  position:fixed!important;
  inset:0!important;
  z-index:2147483640!important;
  width:100vw!important;
  height:100vh!important;
  transform:none!important;
  isolation:isolate!important;
}


/* Batch 22 Correction 11 — visible Start Audio Call diagnostics */
.ms-call-debug-live{
  width:min(650px,100%);
  max-height:190px;
  overflow:auto;
  margin:0 auto 14px;
  padding:12px 14px;
  border:1px solid #d7c4ca;
  border-radius:12px;
  background:#24171c;
  color:#f6e8ed;
  text-align:left;
  white-space:pre-wrap;
  word-break:break-word;
  font:11px/1.48 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
.ms-call-debug-live[hidden]{display:none!important}
.ms-call-debug-live::selection{background:#a62c52;color:#fff}


/* Batch 22 Correction 18: authoritative receiver call popup */
.ms-v18-incoming-call{
    position:fixed!important;
    inset:0!important;
    z-index:2147483600!important;
    display:grid!important;
    place-items:center!important;
    width:100vw!important;
    height:100vh!important;
    background:rgba(25,7,14,.72)!important;
    backdrop-filter:blur(12px)!important;
    -webkit-backdrop-filter:blur(12px)!important;
    pointer-events:auto!important;
}
.ms-v18-incoming-call[hidden]{display:none!important}
.ms-v18-incoming-call .ms-incoming-call-card{pointer-events:auto!important}


/* Batch 22 Correction 19 — receiver dialog is mounted directly under body */
#ms-inline-incoming-call{
    position:fixed!important;
    inset:0!important;
    z-index:2147483640!important;
    width:100vw!important;
    height:100vh!important;
    max-width:none!important;
    max-height:none!important;
    margin:0!important;
    transform:none!important;
    overflow:auto!important;
    pointer-events:auto!important;
}

#ms-inline-incoming-call .ms-incoming-call-card{
    position:relative!important;
    z-index:2147483641!important;
    pointer-events:auto!important;
}

html.ms-has-incoming-call,
html.ms-has-incoming-call body{
    overflow:hidden!important;
}

html.ms-has-incoming-call .ms-sidebar,
html.ms-has-incoming-call .ms-topbar,
html.ms-has-incoming-call .ms-comm-rail{
    pointer-events:none!important;
}


/* Batch 22 Correction 20 */
#ms-v20-incoming-call{
    pointer-events:auto!important;
}
#ms-v20-incoming-call .ms-incoming-call-card{
    position:relative!important;
    z-index:2147483647!important;
    pointer-events:auto!important;
}
html.ms-v20-call-open,
html.ms-v20-call-open body{
    overflow:hidden!important;
}
