/* Shared controls keep their own space, including cached landing-page styles. */
body.m7-canvas .m7-site .m7-whatsapp{top:auto;right:max(16px,env(safe-area-inset-right));bottom:calc(18px + env(safe-area-inset-bottom));width:52px;height:52px;box-sizing:border-box}
body .m7-cookie-reopen{min-height:44px;min-width:72px;box-sizing:border-box;left:max(12px,env(safe-area-inset-left));bottom:calc(12px + env(safe-area-inset-bottom))}
body.m7-canvas .m7-site :is(button,a,input,select,textarea):focus-visible,body .m7-panel :is(button,a,input,select,textarea,summary):focus-visible{outline:2px solid #e3c78c;outline-offset:3px}
body.m7-canvas .m7-site :is(audio,iframe){max-width:100%}
body.m7-canvas .m7-site :is(.m7-footer,.m7-academy-shell){padding-bottom:max(90px,calc(74px + env(safe-area-inset-bottom)))}
body.m7-canvas .m7-site :is([id],.m7-pdf-reader){scroll-margin-top:92px}
body.m7-cookie-visible .m7-mobile-purchase{visibility:hidden}
@media(max-width:1100px){
 body.m7-canvas .m7-site .m7-header .m7-nav{max-height:calc(100dvh - 76px);overflow-y:auto;overscroll-behavior:contain}
 body.m7-canvas .m7-site:has(.m7-nav.is-open) .m7-whatsapp{visibility:hidden}
}
@media(max-width:700px){
 body.m7-canvas .m7-site .m7-whatsapp>span{display:none}
 body.m7-canvas .m7-site .m7-whatsapp>svg{width:27px;height:27px}
 body .m7-academy-shell :is(input:not([type=checkbox]),select,textarea),body .m7-panel :is(input:not([type=checkbox]),select,textarea){font-size:16px}
 body .m7-campus-tabs button,body .m7-login-tabs button,body .m7-panel-nav button{min-height:44px}
 body .m7-panel-sidebar .m7-panel-nav{scroll-padding-inline:12px}
}
@media(max-width:600px){
 body:has(.m7-mobile-purchase){--m7-mobile-dock-fallback:88px}
 body.m7-canvas .m7-site .m7-whatsapp{top:auto;right:max(16px,env(safe-area-inset-right));bottom:calc(var(--m7-mobile-dock-height,var(--m7-mobile-dock-fallback,0px)) + 16px + env(safe-area-inset-bottom));width:48px;height:48px;border-width:1px;box-shadow:0 5px 20px #0003}
 body .m7-cookie-reopen{bottom:calc(var(--m7-mobile-dock-height,var(--m7-mobile-dock-fallback,0px)) + 16px + env(safe-area-inset-bottom))}
 body.m7-canvas .m7-site .m7-header .m7-nav{max-height:calc(100dvh - 68px)}
 body.m7-canvas .m7-site .m7-mobile-purchase{gap:10px;padding-right:80px}
 body.m7-canvas .m7-site .m7-mobile-purchase>div{min-width:0}
 body.m7-canvas .m7-site .m7-mobile-purchase .m7-btn{min-height:48px;min-width:0;padding-inline:14px;font-size:13px;gap:10px;flex-shrink:0}
 body.m7-canvas:has(.m7-mobile-purchase) .m7-whatsapp{bottom:calc(12px + env(safe-area-inset-bottom));right:max(14px,env(safe-area-inset-right));z-index:55}
 /* The footer keeps the same cookie-preferences action; avoid a duplicate floating button over the purchase bar. */
 body:has(.m7-mobile-purchase) .m7-cookie-reopen{display:none}
 body.m7-canvas .m7-site:has(.m7-mobile-purchase) .m7-footer{padding-bottom:calc(var(--m7-mobile-dock-height,88px) + 92px)}
 body.m7-canvas .m7-site :is([id],.m7-pdf-reader){scroll-margin-top:78px}
}
@media(max-height:600px){
 body.m7-cookie-visible .m7-whatsapp{visibility:hidden}
}

/* MATRIX-7: selector de moneda alineado y de tamaño estable — 2.2.7 */
body.m7-canvas .m7-site .m7-header [data-menu-currency]{display:flex;align-items:center;align-self:center;flex:0 0 auto;gap:8px;margin:0;padding:0;line-height:1;white-space:nowrap}
body.m7-canvas .m7-site .m7-header>[data-menu-currency]{margin-left:auto}
body.m7-canvas .m7-site .m7-header [data-menu-currency]>span{line-height:1.2;margin:0;padding:0}
body.m7-canvas .m7-site .m7-header [data-menu-currency] select{display:block;box-sizing:border-box;flex:0 0 80px;width:80px;min-width:80px;max-width:80px;height:44px;min-height:44px;max-height:44px;margin:0;padding:8px 6px;font-size:14px;line-height:normal;vertical-align:middle}
@media(min-width:1281px){body.m7-canvas .m7-site[data-page="home"] .m7-header .m7-nav-cta{width:240px;flex:0 0 240px;justify-content:center;white-space:nowrap}}
@media(min-width:1101px) and (max-width:1280px){
 body.m7-canvas .m7-site .m7-header{height:76px;padding-inline:30px;gap:12px}
 body.m7-canvas .m7-site .m7-header .m7-nav-toggle{display:block;flex:0 0 auto;margin:0;padding:10px 4px;min-width:36px;min-height:44px}
 body.m7-canvas .m7-site .m7-header .m7-nav{display:none;position:absolute;top:75px;left:0;right:0;flex-direction:column;align-items:stretch;padding:20px 25px;gap:6px;background:#141517;border-bottom:1px solid #b7944e40;box-shadow:0 20px 30px #0001;max-height:calc(100dvh - 76px);overflow-y:auto;overscroll-behavior:contain}
 body.m7-canvas .m7-site .m7-header .m7-nav.is-open{display:flex}
 body.m7-canvas .m7-site .m7-header .m7-nav>a{padding:12px;font-size:14px}
 body.m7-canvas .m7-site .m7-header .m7-nav-account{max-width:none;border-top:1px solid #b7944e40;margin-top:5px;padding-top:19px}
 body.m7-canvas .m7-site .m7-header .m7-nav-cta{justify-content:space-between}
 body.m7-canvas .m7-site:has(.m7-nav.is-open) .m7-whatsapp{visibility:hidden}
}
@media(max-width:1280px){
 body.m7-canvas .m7-site .m7-header>[data-menu-currency]>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body.m7-canvas .m7-site .m7-header [data-menu-currency] select{font-size:16px}
}

/* Keep support and privacy controls outside the student's writing area. */
body.m7-canvas .m7-site[data-page="account"] .m7-workspace-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 24px;padding:0;max-width:100%}
body.m7-canvas .m7-site[data-page="account"] .m7-whatsapp.m7-workspace-support{position:static;display:inline-flex;flex-direction:row-reverse;justify-content:flex-start;gap:9px;width:auto;max-width:100%;height:auto;min-height:44px;margin:0;padding:9px 14px;border:1px solid #42664f;border-radius:30px;background:#18281e;box-shadow:none;transform:none;visibility:visible}
body.m7-canvas .m7-site[data-page="account"] .m7-whatsapp.m7-workspace-support>span{position:static;display:inline;white-space:normal;padding:0;margin:0;border:0;background:transparent;color:#d5e5d9;font:13px/1.5 system-ui;box-shadow:none}
body.m7-canvas .m7-site[data-page="account"] .m7-whatsapp.m7-workspace-support>svg{width:21px;height:21px;flex:0 0 21px}
body.m7-canvas .m7-site[data-page="account"] .m7-workspace-privacy{min-height:44px;max-width:100%;padding:9px 14px;border:1px solid #d6b66c35;border-radius:30px;background:#18191a;color:#d5c9b2;font:12px/1.5 system-ui;cursor:pointer}
body.m7-workspace-utilities .m7-cookie-reopen{display:none}
body.m7-canvas .m7-academy-shell .m7-btn-outline{color:#ead4a9!important;border-color:#9c8355;background:#1d1f20}
body.m7-canvas .m7-academy-shell .m7-btn-outline:hover{background:#333026;color:#fff0ce!important}
body.m7-canvas .m7-academy-shell .m7-btn:disabled{cursor:default;opacity:.55;transform:none}
@media(max-width:600px){
 body .m7-campus-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;overflow:visible}
 body .m7-campus-tabs button{white-space:normal;padding:10px 12px;font-size:13px;line-height:1.4;min-width:0}
 body .m7-campus-tabs button:last-child:nth-child(odd){grid-column:1/-1}
}
