/* Polyglot AI 5.0.1 - Desktop right-content scrolling fix */

/* The original app-shell used overflow:hidden, which blocks document scrolling
   after the desktop sidebar was changed to position:fixed. */
html{
  min-height:100%;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  scroll-behavior:smooth;
}
body{
  min-height:100%;
  height:auto!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior-y:auto!important;
}
#root,
.app-shell{
  min-height:100vh!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
}

@media (min-width:981px){
  .topbar{
    position:sticky!important;
    top:0!important;
    z-index:900!important;
  }
  .app-body{
    min-height:calc(100vh - 76px)!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    align-items:start!important;
  }
  .app-body>main,
  main,
  .main-content{
    min-width:0!important;
    min-height:calc(100vh - 112px)!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
  }
  .page-section{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding-bottom:110px!important;
  }
  /* Keep only the left navigation independently scrollable. */
  .sidebar{
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
  }
}

/* Preserve modal/room scroll locking only while those views are truly open. */
body.v38-open{
  overflow:hidden!important;
}
