/* ==========================================================
   NexoPlay V48 - Auth glass continuity
   Makes the login/register body use the exact same glass layer
   as the modal header. Independent from the global light/dark
   theme. No JavaScript, timers, observers or animations added.
   ========================================================== */

/* Logged-out authentication only. The profile remains untouched. */
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-modal {
  /* Keep one single glass surface for the complete card. */
  background: rgba(7, 12, 27, .36) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: #fff !important;
}

/* V43 painted .auth-body with the global theme surface. That was
   the opaque navy/white block visible below the transparent header.
   The body must be transparent so the parent glass is visible. */
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-body,
body[data-nx-theme="light"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-body,
body[data-nx-theme="dark"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-body {
  background: transparent !important;
  background-color: transparent !important;
  color: #fff !important;
}

#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-head,
body[data-nx-theme="light"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-head,
body[data-nx-theme="dark"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-head,
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-form {
  background: transparent !important;
  background-color: transparent !important;
}

/* Theme hardening must never recolor the auth glass. */
body[data-nx-theme="light"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-modal,
body[data-nx-theme="dark"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-modal {
  background: rgba(7, 12, 27, .36) !important;
  border-color: rgba(255,255,255,.18) !important;
  color: #fff !important;
}

/* Inputs remain translucent instead of becoming light/dark theme cards. */
body[data-nx-theme="light"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input,
body[data-nx-theme="dark"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input {
  background: rgba(5,10,24,.28) !important;
  color: #fff !important;
  border-color: rgba(255,255,255,.22) !important;
}

body[data-nx-theme="light"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input::placeholder,
body[data-nx-theme="dark"] #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-input::placeholder {
  color: rgba(255,255,255,.47) !important;
}

/* Do not add another backdrop-filter layer on children: one blur on
   .auth-modal is enough and is cheaper on mobile GPUs. */
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-body,
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-head,
#authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-form {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}


/* ==========================================================
   V48.1 - Auth performance / mobile compactness
   - Nexo mascot is never interactive over Login/Register.
   - Mobile logged-out auth cards size to their real content instead
     of inheriting the full-viewport height from V32.
   ========================================================== */

/* Only hide the floating Nexo mascot while the logged-out auth card is open.
   Profile mode keeps its existing behavior untouched. */
#authBg.open:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) ~ #nexoMascot {
  display: none !important;
  pointer-events: none !important;
}

@media (max-width: 520px) {
  #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-modal {
    height: auto !important;
    max-height: calc(100dvh - 20px) !important;
  }

  #authBg:not([data-nx7-mode="profile"]):not([data-nx8-profile="1"]) .auth-body {
    flex: 0 1 auto !important;
    min-height: 0 !important;
    padding-bottom: 18px !important;
  }
}
