/* MALEK ACADEMY — NEXUS Studio Gate 12J v0.9.18
   Mobile/short-viewport authentication dialogs, including published themes.
   One real scroll surface: the fixed overlay.  Leave form DOM, submit and
   authentication JavaScript unchanged.

   CRITICAL: Published NEXUS identity CSS sets `overflow:hidden !important`
   and `max-height:calc(100dvh - 20px) !important` on .nx-auth-dialog.
   Those rules beat old Gate 12H's lower-specificity mobile declarations.
   Match the published scope and load this file after the theme CSS. */
@media (max-width: 850px), (max-height: 620px) {
  html body .nx-auth-overlay:not([hidden]),
  html[data-nxs-active="1"] body .nx-auth-overlay:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box;
    padding: max(12px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: contain;
    scroll-behavior: auto;
  }
  html body .nx-auth-overlay .nx-auth-dialog,
  html body .nx-auth-overlay .nx-auth-register,
  html[data-nxs-active="1"] body .nx-auth-overlay .nx-auth-dialog,
  html[data-nxs-active="1"] body .nx-auth-overlay .nx-auth-register {
    position: relative;
    display: block !important;
    width: min(580px, 100%) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    overflow: visible !important;
    border-radius: 24px;
  }
  html body .nx-auth-overlay .nx-auth-content,
  html body .nx-auth-overlay .nx-auth-register .nx-auth-content,
  html[data-nxs-active="1"] body .nx-auth-overlay .nx-auth-content,
  html[data-nxs-active="1"] body .nx-auth-overlay .nx-auth-register .nx-auth-content {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-overflow-scrolling: auto;
  }
  html body .nx-auth-overlay .nx-auth-aside,
  html[data-nxs-active="1"] body .nx-auth-overlay .nx-auth-aside {
    display: none !important;
  }
}
