/* Chats screen: three-dots menu, Groups view and the Message Settings panel. */
.wa-inbox-head{padding-left:4px!important}
.wa-inbox-head h2{padding-left:2px}
.mw-inbox-menu{min-width:224px}
.mw-inbox-menu button{display:flex!important;align-items:center;gap:14px}
.mw-inbox-menu svg{width:20px!important;height:20px!important;color:var(--wa-muted)}
html[dir="rtl"] .mw-inbox-menu{right:auto;left:10px;transform-origin:top left}
html[dir="rtl"] .mw-inbox-menu button{text-align:right}
html[dir="rtl"] .wa-inbox-head .wa-back svg{transform:scaleX(-1)}

.mw-inbox-section-head{display:flex;align-items:center;gap:8px;padding-right:12px}
.mw-inbox-section-head .wa-section{flex:1;min-width:0}
html[dir="rtl"] .mw-inbox-section-head{padding:0 0 0 12px}
.wa-inbox-scroll.mw-groups-view :is(.mw-inbox-chats-title,#msgList){display:none!important}
#msgSheet.mw-groups-view #privateDmSearchWrap{display:none!important}
#msgSheet.mw-groups-view #createGroupBtn{order:2}

/* Compact pill used across the Chats screens. */
.mw-pill{display:inline-flex!important;align-items:center;justify-content:center;gap:4px;height:30px;min-height:30px!important;margin:10px 0 0!important;padding:0 14px!important;border-radius:20px!important;border:1px solid transparent!important;background:var(--wa-accent,var(--mw-accent,#3d9cff))!important;color:#fff!important;font:inherit;font-size:.78rem!important;font-weight:700;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:none!important;transition:filter .15s,background .15s}
.mw-pill:hover{filter:brightness(1.08)}
.mw-pill.ghost{background:transparent!important;border-color:var(--wa-line,var(--line))!important;color:var(--wa-text,var(--text))!important}
.mw-pill.ghost:hover{background:var(--wa-hover,rgba(255,255,255,.06))!important}
.mw-pill[hidden]{display:none!important}
.mw-pill:disabled{opacity:.55;cursor:not-allowed}
.mw-pill:focus-visible{outline:2px solid var(--wa-accent,var(--mw-accent,#3d9cff));outline-offset:2px}

/* Message Settings: full page on phones, a centred card on wider screens, above the Chats page. */
.mw-msg-settings{z-index:170!important;padding:0!important;align-items:stretch!important;justify-content:center!important;background:var(--bg,#071020)!important;height:var(--mw-viewport,100dvh)!important;top:var(--mw-viewport-top,0px)!important;bottom:auto!important}
.mw-msg-settings .sheet{display:flex;flex-direction:column;width:100%!important;max-width:none!important;height:100%!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;overflow:hidden!important;animation:none!important}
.mw-ms-head{display:flex;align-items:center;gap:6px;min-height:58px;padding:calc(6px + env(safe-area-inset-top,0px)) 12px 6px 4px;border-bottom:1px solid var(--line);flex:0 0 auto}
.mw-ms-head h2{margin:0!important;font-size:1.15rem!important;font-weight:700;letter-spacing:-.01em}
.mw-ms-back{display:inline-grid;place-items:center;width:42px;height:42px;min-height:0!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--text)!important;cursor:pointer;box-shadow:none!important}
.mw-ms-back:hover,.mw-ms-back:focus-visible{background:rgba(255,255,255,.08)!important}
.mw-ms-back svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
html[dir="rtl"] .mw-ms-back svg{transform:scaleX(-1)}
.mw-ms-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 14px calc(22px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:16px}
.mw-ms-group h3{margin:0 6px 7px!important;font-size:.7rem!important;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)!important}
.mw-ms-card{border-radius:18px;padding:2px 14px;background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.025));border:1px solid var(--mw-glass-line,var(--line));box-shadow:inset 0 1px rgba(255,255,255,.06)}
html:is([data-mw-appearance="light"],[data-mw-appearance="sunlight"]) .mw-ms-card{background:rgba(255,255,255,.75);box-shadow:0 6px 20px rgba(16,48,74,.06)}
.mw-ms-row{display:flex;align-items:center;gap:14px;min-height:58px;padding:11px 0;border-bottom:1px solid var(--line);cursor:pointer}
.mw-ms-row:last-child{border-bottom:0}
.mw-ms-row>span{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.mw-ms-row b{font-size:.9rem;font-weight:650;color:var(--text)}
.mw-ms-row small,.mw-ms-help{font-size:.75rem;line-height:1.4;color:var(--muted)}
.mw-ms-help{margin:12px 0 4px!important}
.mw-ms-select select{flex:0 0 auto;max-width:46%;height:34px;padding:0 10px;border-radius:20px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:var(--text);font:inherit;font-size:.8rem;font-weight:600}
.mw-ms-row input[type=checkbox]{-webkit-appearance:none;appearance:none;flex:0 0 auto;position:relative;width:46px!important;height:26px!important;margin:0;padding:0!important;border-radius:999px!important;background:rgba(148,163,184,.3)!important;border:1px solid rgba(255,255,255,.14)!important;cursor:pointer;transition:background .2s}
.mw-ms-row input[type=checkbox]::before{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.3);transition:transform .2s cubic-bezier(.3,.7,.4,1.2)}
.mw-ms-row input[type=checkbox]:checked{background:var(--mw-accent,#3d9cff)!important;border-color:transparent!important}
.mw-ms-row input[type=checkbox]:checked::before{transform:translateX(20px)}
html[dir="rtl"] .mw-ms-row input[type=checkbox]::before{left:auto;right:2px}
html[dir="rtl"] .mw-ms-row input[type=checkbox]:checked::before{transform:translateX(-20px)}
.mw-ms-row :is(input,select):focus-visible{outline:2px solid var(--mw-accent,#3d9cff);outline-offset:3px}
.mw-ms-row :is(input,select):disabled{opacity:.45;cursor:progress}
.mw-ms-status{margin:0!important;padding:9px 14px;border-radius:12px;font-size:.8rem;font-weight:600;background:rgba(61,156,255,.12);color:var(--text)}
.mw-ms-status[data-tone="error"]{background:rgba(239,68,68,.14);color:#fca5a5}
.mw-ms-status[hidden]{display:none!important}
.mw-ms-blocked{padding:4px 0 8px}
.mw-ms-empty{margin:6px 0 8px!important;font-size:.82rem;color:var(--muted)}
.mw-ms-contact{display:flex;align-items:center;gap:12px;padding:8px 0;border-top:1px solid var(--line)}
.mw-ms-contact:first-child{border-top:0}
.mw-ms-avatar{display:grid;place-items:center;flex:0 0 auto;width:40px;height:40px;border-radius:50%;overflow:hidden;background:rgba(255,255,255,.1);font-weight:700;color:var(--text)}
.mw-ms-avatar img{width:100%;height:100%;object-fit:cover}
.mw-ms-name{flex:1;min-width:0;display:flex;flex-direction:column}
.mw-ms-name :is(b,small){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mw-ms-name b{font-size:.88rem;color:var(--text)}
.mw-ms-name small{font-size:.74rem;color:var(--muted)}
.mw-ms-contact .mw-pill{margin:0!important}
@media(min-width:700px){
  .mw-msg-settings{align-items:center!important;padding:20px!important;background:rgba(0,0,0,.72)!important}
  .mw-msg-settings .sheet{width:min(560px,100%)!important;height:min(86vh,760px)!important;border-radius:20px!important;border:1px solid var(--line)!important}
}
