/*
============================================================
NOYTRIX PROFILE V106.3
PROFILE SCROLL RESTORE

Only affects the authenticated Profile page.
Does NOT change scrolling on other screens.
============================================================
*/


/*
 * Browser document itself must be allowed to grow.
 */

html:has(body.p56-profile-open),
html:has(body.nx106-profile-active) {
  height: auto !important;
  min-height: 100% !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;
}


body.p56-profile-open,
body.nx106-profile-active {
  height: auto !important;
  min-height: 100vh !important;
  max-height: none !important;

  overflow-y: auto !important;
  overflow-x: hidden !important;

  position: static !important;
}


/*
 * Main app containers must not create
 * a second clipped viewport.
 */

body.p56-profile-open .app,
body.p56-profile-open .app-shell,
body.p56-profile-open .workspace,
body.p56-profile-open .workspace-main,
body.p56-profile-open main,

body.nx106-profile-active .app,
body.nx106-profile-active .app-shell,
body.nx106-profile-active .workspace,
body.nx106-profile-active .workspace-main,
body.nx106-profile-active main {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: visible !important;
}


/*
 * Dynamic Profile screen must grow naturally
 * with Profile + original Settings content.
 */

body.p56-profile-open #screen-profile-v56,
body.nx106-profile-active #screen-profile-v56 {
  position: relative !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: visible !important;
}


/*
 * V105 / V106 containers.
 */

body.p56-profile-open #screen-profile-v56 > .nx105-settings-only,
body.p56-profile-open #screen-profile-v56 .nx106-profile,

body.nx106-profile-active #screen-profile-v56 > .nx105-settings-only,
body.nx106-profile-active #screen-profile-v56 .nx106-profile {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: visible !important;
}


/*
 * Original Settings is embedded in Profile.
 * Never clip its lower sections.
 */

body.p56-profile-open #screen-profile-v56 #screen-settings,
body.nx106-profile-active #screen-profile-v56 #screen-settings {
  position: relative !important;

  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  overflow: visible !important;
}


/*
 * Prevent old profile wrappers from owning
 * the viewport scroll.
 */

body.p56-profile-open #screen-profile-v56 .p56-root,
body.nx106-profile-active #screen-profile-v56 .p56-root {
  max-height: none !important;
}


/*
 * Normal browser scrollbar.
 */

body.p56-profile-open,
body.nx106-profile-active {
  overscroll-behavior-y: auto !important;
}
