/* Sidebar scroll layout — loaded directly so it works even when SCSS build is stale */

.app-sidebar.offcanvas {
  overflow: hidden !important;
}

@media (min-width: 992px) {
  .app-sidebar.offcanvas-lg {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .app-sidebar.offcanvas-lg > .offcanvas-body.app-sidebar-inner {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
    padding: 0 !important;
  }
}

.app-sidebar-inner {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.sidebar-brand,
.sidebar-footer {
  flex-shrink: 0;
}

.sidebar-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 991.98px) {
  .app-sidebar {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
  }

  .app-sidebar .offcanvas-body.app-sidebar-inner {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-height: 0 !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
  }
}
