/* mail-r4.css — phone simplification + prominent assistant (task 9382e678). Phone only (<=760px). Desktop untouched. */
@media (max-width:760px){
html.r4{--r4-ink:#1d1430;--r4-mut:#6c6580;--r4-bg:#fff;--r4-line:#efebf5;--r4-acc:#5b2bb5;--r4-tone:#efe8fc;--r4-tone-ink:#4a1fa0}
/* ---------- header: menu · title · search · avatar ---------- */
html.r4.r4-mail #hdr{min-height:58px;padding-inline:6px 10px;gap:4px;background:var(--r4-bg);border-bottom:0;box-shadow:none}
html.r4.r4-mail #hdr>.y365-sw,html.r4.r4-mail #hdr>nav.tabs,html.r4.r4-mail #hdr>.r3-acl,html.r4.r4-mail #hdr>.brand,html.r4.r4-mail #hdr>.sp{display:none!important}
html.r4.r4-mail #hdr>[data-menu]{order:-5;width:44px!important;height:44px!important;border-radius:50%!important;display:inline-flex!important}
html.r4.r4-mail #hdr>.r4-tt{order:-4;flex:1 1 auto;min-width:0;font-size:21px;font-weight:800;color:var(--r4-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-inline:4px;letter-spacing:0}
html.r4.r4-mail #hdr>.r4-q{order:4;flex:0 0 44px;width:44px;height:44px;border-radius:50%;border:0;background:transparent;color:var(--r4-ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
html.r4.r4-mail #hdr>.r4-q .ic{width:22px;height:22px}
html.r4.r4-mail #hdr>#acct{order:5!important;flex:0 0 auto}
html.r4.r4-mail #hdr>#acct .av{width:34px!important;height:34px!important;min-width:34px!important;font-size:14px!important;margin:5px!important}
html.r4:not(.r4-mail) .r4-tt,html.r4:not(.r4-mail) .r4-q{display:none!important}
/* ---------- list head: everything moves to the drawer ---------- */
html.r4 #ymm-rib{display:none!important}
html.r4 .mail #list .lhead .lbar,html.r4 .mail #list .lhead .chips,html.r4 .mail #list .lhead .mx-tabs,html.r4 .mail #list .lhead #ymm-hub,html.r4 .mail #list .lhead .ymm-hub{display:none!important}
html.r4:not(.r4-q) .mail #list .lhead form.search{display:none!important}
html.r4.r4-q .mail #list .lhead form.search{margin:4px 16px 8px!important}
html.r4.r4-q .mail #list .lhead form.search .mx-fbtn{display:none!important}
html.r4 .mail #list .lhead{padding:0!important;border:0!important;min-height:0!important;background:transparent!important;box-shadow:none!important}
/* ---------- rows: sender · subject · time ---------- */
html.r4 .mail #items .it{padding:14px 20px!important;gap:0!important;min-height:0!important;border-bottom:1px solid var(--r4-line)!important;background:transparent;border-radius:0!important}
html.r4 .mail #items .it>.ck,html.r4 .mail #items .it>.av,html.r4 .mail #items .it>.star,html.r4 .mail #items .it .cnt,html.r4 .mail #items .it .r3,html.r4 .mail #items .it .chip,html.r4 .mail #items .it .ymk,html.r4 .mail #items .it [data-mm],html.r4 .mail #items .it .ib>*:not(.r1):not(.r2){display:none!important}
html.r4 .mail #items .it .ib{min-width:0;flex:1 1 auto;padding:0!important}
html.r4 .mail #items .it .r1{display:flex!important;align-items:baseline;gap:10px;margin:0 0 3px!important}
html.r4 .mail #items .it .r1>*:not(.who):not(.when){display:none!important}
html.r4 .mail #items .it .who{flex:1 1 auto;min-width:0;font-size:16.5px!important;font-weight:600;color:var(--r4-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.r4 .mail #items .it.unread .who{font-weight:800}
html.r4 .mail #items .it .when{flex:0 0 auto;font-size:13px!important;color:var(--r4-mut);font-weight:500}
html.r4 .mail #items .it.unread .when{color:var(--r4-acc);font-weight:700}
html.r4 .mail #items .it .r2{display:block!important;margin:0!important}
html.r4 .mail #items .it .r2>*:not(.sub){display:none!important}
html.r4 .mail #items .it .sub{display:block;font-size:15.5px!important;color:var(--r4-mut);font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.r4 .mail #items .it.unread .sub{color:var(--r4-ink)}
html.r4 .mail #items .it.on{background:var(--r4-tone)!important}
html.r4 .mail #list{padding-bottom:104px!important}
html.r4 .mail #items{padding-bottom:104px!important}
/* ---------- read: back · archive · delete · more ---------- */
html.r4.r4-read #hdr{display:none!important}
html.r4 .mail #read .rtool{flex-wrap:wrap;row-gap:2px;padding-inline:8px!important;min-height:56px;border-bottom:1px solid var(--r4-line)}
html.r4 .mail #read .rtool>button{width:44px!important;height:44px!important;border-radius:50%!important}
html.r4:not(.r4-rx) .mail #read .rtool>button:not([data-back]):not([data-a=archive]):not([data-a=delete]):not(.r4-more){display:none!important}
html.r4.r4-rx .mail #read .rtool>.btn.soft[data-ai]{display:none!important}
html.r4 .mail #read .rtool>.r4-more{order:50;display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;color:var(--r4-ink);cursor:pointer}
html.r4.r4-rx .mail #read .rtool>.r4-more{background:var(--r4-tone);color:var(--r4-tone-ink)}
html.r4 .mail #read .msgs article.msg:not(.open) .mh [data-mm]{display:none!important}
html.r4:not(.r4-rx) .mail #read [data-r],html.r4:not(.r4-rx) .mail #read [data-bi]{display:none!important}
html.r4 .mail #read{padding-bottom:104px!important}
/* ---------- bottom bar: assistant + new message (or reply) ---------- */
html.r4 .mail .fab{display:none!important}
html.r4.yoc-phone.yoc-collapsed #yoc{visibility:hidden!important;pointer-events:none!important}
.r4-bar{display:none}
html.r4.r4-mail .r4-bar{display:flex;position:fixed;z-index:60;inset-inline:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));gap:10px;justify-content:space-between;align-items:center;pointer-events:none}
html.r4.r4-mail .r4-bar>button{pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:52px;min-width:52px;padding:0 20px;border-radius:999px;border:0;font:inherit;font-size:16px;font-weight:700;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent}
html.r4.r4-mail .r4-bar .ic{width:20px;height:20px;flex:none}
html.r4.r4-mail .r4-bar .r4-ai{background:#fff;color:var(--r4-tone-ink);box-shadow:0 0 0 1.5px #d9cbf6 inset,0 10px 24px -12px rgba(59,19,102,.55)}
html.r4.r4-mail .r4-bar .r4-ai .r4-sp{display:inline-flex;width:28px;height:28px;margin-inline-start:-8px;border-radius:50%;align-items:center;justify-content:center;background:linear-gradient(135deg,#7b3fe4,#c04bd8);color:#fff}
html.r4.r4-mail .r4-bar .r4-ai .r4-sp .ic{width:16px;height:16px}
html.r4.r4-mail .r4-bar .r4-go{background:var(--grad,linear-gradient(135deg,#5b2bb5,#7b3fe4));color:#fff;box-shadow:0 12px 26px -12px rgba(59,19,102,.7)}
html.r4 .mail.rail-open~.r4-bar,html.r4.r4-railopen .r4-bar,html.r4.yoc-phone:not(.yoc-collapsed) .r4-bar,html.r4.r4-dlg .r4-bar{display:none!important}
@media (max-width:340px){html.r4.r4-mail .r4-bar{inset-inline:10px;gap:8px}html.r4.r4-mail .r4-bar>button{padding:0 14px;font-size:15px}}
/* ---------- drawer: view & filters section (proxies) ---------- */
html.r4 #rail .r4-dx{padding:4px 0 6px}
html.r4 #rail .r4-dx .r4-chips{display:flex;flex-wrap:wrap;gap:8px;padding:4px 16px 8px}
html.r4 #rail .r4-dx .r4-chips button{min-height:40px;padding:0 14px;border-radius:999px;border:1px solid var(--r4-line);background:var(--r4-bg);color:var(--r4-ink);font:inherit;font-size:14.5px;cursor:pointer}
html.r4 #rail .r4-dx .r4-chips button.on{background:var(--r4-tone);border-color:transparent;color:var(--r4-tone-ink);font-weight:700}
/* ---------- assistant: a bottom sheet over the page; the page is never resized ---------- */
html.r4.r4-mail.yoc-phone:not(.yoc-collapsed):not(.yoc-ph-full)>body,html.r4.r4-mail.yoc-phone.yoc-on:not(.yoc-collapsed)>body{height:100dvh!important;max-height:100dvh!important}
html.r4.yoc-phone:not(.yoc-collapsed){--r4h:min(var(--yoc-ph,62dvh),70dvh,calc(var(--yoc-vh,100dvh) - 20px))}
html.r4.yoc-phone:not(.yoc-collapsed) #yoc.yoc,html.r4.yoc-phone.yoc-ph-full:not(.yoc-collapsed) #yoc.yoc{top:calc(var(--yoc-vt,0px) + var(--yoc-vh,100dvh) - var(--r4h))!important;bottom:auto!important;height:var(--r4h)!important;max-height:70dvh!important;width:100%!important;max-width:100%!important;left:0!important;right:0!important;border-radius:22px 22px 0 0!important;overflow:hidden!important;box-shadow:0 -18px 40px -16px rgba(20,8,40,.45)!important}
html.r4.yoc-phone:not(.yoc-collapsed) #yoc .yoc-h{border-radius:22px 22px 0 0!important;padding-top:16px!important;min-height:60px!important}
html.r4.yoc-phone:not(.yoc-collapsed) #yoc .yoc-back{display:none!important}
html.r4 #yoc .r4-x{display:none}
html.r4.yoc-phone #yoc .yoc-exp{display:none!important}
html.r4.yoc-phone:not(.yoc-collapsed) #yoc .r4-x{display:inline-flex;align-items:center;justify-content:center;flex:0 0 40px;width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.18);color:#fff;cursor:pointer;margin-inline-start:2px}
html.r4.yoc-phone:not(.yoc-collapsed) #yoc .r4-x .ic{width:20px;height:20px}
html.r4.yoc-phone:not(.yoc-collapsed) #yoc .yoc-drag::after{width:44px!important;height:5px!important;margin-left:-22px!important;background:rgba(255,255,255,.7)!important}
.r4-scrim{display:none}
html.r4.yoc-phone:not(.yoc-collapsed) .r4-scrim{display:block;position:fixed;inset:0;background:rgba(20,10,35,.38);z-index:2147482990;animation:r4f .2s ease}
@keyframes r4f{from{opacity:0}to{opacity:1}}
}
@media (max-width:760px) and (prefers-color-scheme:dark){
html.r4{--r4-ink:#f1ecfa;--r4-mut:#a59eb8;--r4-bg:#17131f;--r4-line:#2a2436;--r4-tone:#2e2346;--r4-tone-ink:#d9c8ff;--r4-acc:#b996ff}
html.r4.r4-mail .r4-bar .r4-ai{background:#221b30;color:#e6dbff;box-shadow:0 0 0 1.5px #4a3a6e inset,0 10px 24px -12px rgba(0,0,0,.8)}
}

/* wave8 b33ee986: phone tap targets ≥40px and the labels dialog never scrolls sideways (persona H07/H03 on mail ar-360) */
@media (max-width:760px),(pointer:coarse){
  button.btn.icon,button.av,button.y365-sw{min-width:44px;min-height:44px}
  .yoc-chip{min-height:40px}
  .yoc-send{min-width:40px;min-height:40px}
  button.sw{min-width:40px;min-height:40px}
  .dlg{max-width:calc(100vw - 16px);box-sizing:border-box}
  .dlg :is(.sws,.swatches,.colors,.row):has(> button.sw){flex-wrap:wrap}
  a[href*="signin"],a[href*="login"]{display:inline-flex;align-items:center;min-height:40px}
}

/* wave9 6c4272a0: phone header buttons «المجلدات» and «الحساب» are full 44px tap targets (the 34px avatar size above won over the wave8 minimum; persona H07), muted hints darkened to ≥4.5:1 on every mail surface (persona H13) */
@media (max-width:760px),(pointer:coarse){html.r4 button.av,html.r4 #hdr button.btn.icon,html.r4 button.btn.icon{min-width:44px!important;min-height:44px!important}html.r4 button.av{width:44px!important;height:44px!important}}
html.r3{--r3-mut:#5a526e}

/* w68-pe-c29b5b: phone inbox header — the apps switcher matches the other Mail views (44 px round, right beside the menu button) */
@media (max-width:760px){html.r4.r4-mail body #hdr.top>.y365-sw.y365-sw{order:-5!important;width:44px!important;min-width:44px!important;height:44px!important;border-radius:50%!important;margin:0!important;padding:0!important;display:inline-grid!important;place-items:center;flex:0 0 44px!important}html.r4.r4-mail body #hdr.top>[data-menu]{order:-6!important}}
