/* V3.0 account navigation: modular, only the new account controls. */
.mmc-header .mmc-account{position:relative;isolation:isolate;flex:0 0 auto;min-width:0}
.mmc-account__toggle{display:inline-flex;gap:9px;align-items:center;justify-content:center;min-height:46px;max-width:210px;cursor:pointer;border:1px solid rgba(3,110,126,.26);border-radius:16px;padding:7px 13px;background:var(--mmc-teal,#08758a);color:#fff;font:700 .83rem/1.3 Inter,Tajawal,sans-serif;transition:box-shadow .2s,background .2s,transform .2s}
.mmc-account__toggle:hover,.mmc-account__toggle[aria-expanded=true]{background:#066779;box-shadow:0 9px 25px rgba(0,90,110,.22);transform:translateY(-1px)}
.mmc-account__avatar{border-radius:50%;width:31px;height:31px;object-fit:cover;flex:none;border:2px solid rgba(255,255,255,.75)}
.mmc-account__title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:125px}
.mmc-account__icon,.mmc-account__chevron{flex:none}
.mmc-account__chevron{transition:transform .18s}.mmc-account__toggle[aria-expanded=true] .mmc-account__chevron{transform:rotate(180deg)}
.mmc-account__menu[hidden]{display:none!important}
.mmc-account__menu{position:absolute;z-index:120;inset-block-start:calc(100% + 10px);inset-inline-end:0;width:min(290px,calc(100vw - 32px));max-height:min(65vh,500px);overflow-y:auto;padding:10px;border:1px solid #c8e1df;border-radius:20px;background:#fff;color:#153546;box-shadow:0 22px 46px rgba(5,34,47,.22);animation:mmc-account-in .18s ease-out both}
@keyframes mmc-account-in{from{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.mmc-account__menu .mmc-account__greeting{font:700 .86rem/1.5 Inter,Tajawal,sans-serif;color:#37616d;margin:4px 9px 8px;overflow-wrap:anywhere}
.mmc-account__menu a{display:block;padding:12px 13px;font-weight:600;font-size:.86rem;color:#123549;text-decoration:none;border-radius:12px;transition:background .17s,color .17s}
.mmc-account__menu a:hover,.mmc-account__menu a:focus-visible{background:#e6f5f2;color:#006d7d}
.mmc-account__menu a.mmc-account__logout{color:#9e3240;border-top:1px solid #e5eced;border-radius:0 0 10px 10px}
html[dir=rtl] .mmc-account__menu{text-align:right;direction:rtl}
html[dir=rtl] .mmc-account__toggle,html[dir=rtl] .mmc-account__menu{font-family:Tajawal,Arial,sans-serif}
@media(max-width:760px){.mmc-header .mmc-account{grid-column:3;justify-self:end}.mmc-account__toggle{min-height:42px;border-radius:14px;padding:6px 10px;gap:5px;max-width:90px}.mmc-account__title{max-width:52px;font-size:.77rem}.mmc-account__avatar{width:26px;height:26px}.mmc-account__chevron{width:12px}.mmc-account__menu{position:fixed;top:calc(80px + env(safe-area-inset-top));right:12px;left:auto;inset-inline-end:auto;transform-origin:top right;max-width:calc(100vw - 24px)}html[dir=rtl] .mmc-account__menu{right:12px;left:auto}}
@media(prefers-reduced-motion:reduce){.mmc-account__menu{animation:none}.mmc-account__toggle,.mmc-account__chevron{transition:none}}
/* Dark plugin uses root classes; only visual surface changes, not interaction. */
html:is(.mmca-dark,.mmc-dark,[data-theme=dark]) .mmc-account__menu,body:is(.mmca-dark,.mmc-dark) .mmc-account__menu{background:#122e3e;color:#f2f9f9;border-color:#42616f}
html:is(.mmca-dark,.mmc-dark,[data-theme=dark]) .mmc-account__menu a,body:is(.mmca-dark,.mmc-dark) .mmc-account__menu a{color:#e3f1f3}
html:is(.mmca-dark,.mmc-dark,[data-theme=dark]) .mmc-account__menu a:hover,body:is(.mmca-dark,.mmc-dark) .mmc-account__menu a:hover{background:#20495b;color:#f4d79c}
html:is(.mmca-dark,.mmc-dark,[data-theme=dark]) .mmc-account__greeting,body:is(.mmca-dark,.mmc-dark) .mmc-account__greeting{color:#a9d9df}

/* Keep the mobile globe/logo/account columns balanced. */
@media(max-width:760px){
 .mmc-header .mmc-header__inner{grid-template-columns:46px minmax(0,1fr) 79px!important}
 .mmc-header .mmc-account{grid-column:3!important;grid-row:1!important;justify-self:end!important}
 .mmc-header .mmc-account__toggle{width:79px;min-width:0;max-width:79px;padding:7px 8px;gap:5px}
 .mmc-header .mmc-account__icon{display:none}
 .mmc-header .mmc-account__title{max-width:54px}
 .mmc-header .mmc-account--logged .mmc-account__title{display:none}
 .mmc-header .mmc-account__menu{right:12px;left:auto;top:calc(81px + env(safe-area-inset-top));}
}
@media(max-width:350px){.mmc-header .mmc-header__inner{grid-template-columns:42px minmax(0,1fr) 70px!important}.mmc-header .mmc-account__toggle{width:70px;max-width:70px}}

/* V3.1: minimal footprint, compact avatar and single-action guest menu. */
.mmc-header .mmc-account--logged .mmc-account__toggle{width:46px!important;min-width:46px!important;max-width:46px!important;height:46px!important;min-height:46px!important;padding:3px!important;border-radius:50%!important;overflow:hidden;box-shadow:0 3px 12px rgba(0,80,95,.13)}
.mmc-header .mmc-account--logged .mmc-account__avatar{display:block;width:100%!important;height:100%!important;border:0!important;object-fit:cover;border-radius:50%}
.mmc-header .mmc-account--logged .mmc-account__chevron,.mmc-header .mmc-account--logged .mmc-account__title{display:none!important}
.mmc-header .mmc-account--guest .mmc-account__toggle{width:auto!important;min-width:0!important;max-width:110px!important;padding:9px 13px!important;border-radius:16px!important}
.mmc-header .mmc-account--guest .mmc-account__icon{display:block!important}
.mmc-header .mmc-account--guest .mmc-account__chevron{display:none!important}
.mmc-account__menu{width:max-content!important;min-width:178px;max-width:min(225px,calc(100vw - 24px))!important;padding:7px!important;border-radius:17px!important;box-sizing:border-box}
.mmc-account__menu a{padding:10px 12px!important;white-space:nowrap;font-size:.82rem!important}
.mmc-account__menu .mmc-account__greeting{padding:2px 6px 7px!important;margin:0!important;font-size:.78rem!important;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}
.mmc-account__menu .mmc-account__logout{margin-top:4px!important;border-top:1px solid #e1e8e9!important;color:#bd4151!important}
@media(max-width:760px){
 .mmc-header .mmc-header__inner{grid-template-columns:46px minmax(0,1fr) 48px!important}
 .mmc-header .mmc-account{grid-column:3!important;justify-self:end!important}
 .mmc-header .mmc-account--logged .mmc-account__toggle{height:43px!important;min-height:43px!important;width:43px!important;min-width:43px!important;max-width:43px!important}
 .mmc-header .mmc-account--guest .mmc-account__toggle{width:43px!important;min-width:43px!important;max-width:43px!important;height:43px!important;min-height:43px!important;padding:8px!important;border-radius:14px!important}
 .mmc-header .mmc-account--guest .mmc-account__title{display:none!important}
 .mmc-header .mmc-account__menu{position:fixed;inset:auto 12px auto auto;top:calc(80px + env(safe-area-inset-top));width:max-content!important;min-width:165px;max-width:calc(100vw - 24px)!important}
}
html[dir=rtl] .mmc-account__menu{left:12px;right:auto;text-align:right}
