/**
 * Endustri v1.14.9 adaptive sidebar architecture.
 * The card keeps its natural content height. Only overflowing menu content scrolls.
 */
@media (min-width: 801px) {
  .inner-sidebar.vipvize-sidebar-shell {
    --vipvize-sidebar-top: 92px;
    --vipvize-sidebar-available-height: calc(100dvh - 110px);
    position: sticky !important;
    top: var(--vipvize-sidebar-top) !important;
    align-self: start !important;
    display: block !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .inner-sidebar.vipvize-sidebar-shell > .vipvize-sidebar-scroll-region {
    display: block;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: auto !important;
    max-height: var(--vipvize-sidebar-available-height) !important;
    padding-right: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }

  /* Right padding is added only while content actually overflows. */
  .inner-sidebar.vipvize-sidebar-shell.is-scrollable > .vipvize-sidebar-scroll-region {
    padding-right: 7px;
  }

  .inner-sidebar.vipvize-sidebar-shell > .vipvize-sidebar-scroll-region:focus-visible {
    outline: 2px solid rgba(30,115,190,.28);
    outline-offset: -2px;
    border-radius: inherit;
  }

  .inner-sidebar.vipvize-sidebar-shell > .vipvize-sidebar-scroll-region > .widget:last-child,
  .inner-sidebar.vipvize-sidebar-shell > .vipvize-sidebar-scroll-region > :last-child {
    margin-bottom: 0 !important;
  }

  .vipvize-sidebar-scroll-region::-webkit-scrollbar { width: 9px; }
  .vipvize-sidebar-scroll-region::-webkit-scrollbar-track {
    background: #edf3f8;
    border-radius: 999px;
  }
  .vipvize-sidebar-scroll-region::-webkit-scrollbar-thumb {
    min-height: 42px;
    background: #8faec7;
    border: 2px solid #edf3f8;
    border-radius: 999px;
  }
  .vipvize-sidebar-scroll-region::-webkit-scrollbar-thumb:hover { background: #638faf; }
  .vipvize-sidebar-scroll-region {
    scrollbar-width: auto;
    scrollbar-color: #8faec7 #edf3f8;
  }
}

@media (max-width: 800px) {
  .inner-sidebar.vipvize-sidebar-shell {
    position: static !important;
    display: block !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
  .inner-sidebar.vipvize-sidebar-shell > .vipvize-sidebar-scroll-region {
    height: auto !important;
    max-height: none !important;
    padding-right: 0 !important;
    overflow: visible !important;
    scrollbar-gutter: auto;
  }
}

/* Compatibility with existing card/plain widget rules after adding the scroll wrapper. */
.inner-sidebar.inner-sidebar-style-card > .vipvize-sidebar-scroll-region > .widget,
.inner-sidebar.inner-sidebar-style-plain > .vipvize-sidebar-scroll-region > .widget {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.inner-sidebar.inner-sidebar-style-card > .vipvize-sidebar-scroll-region > .widget { margin: 0 0 24px !important; }
.inner-sidebar.inner-sidebar-style-plain > .vipvize-sidebar-scroll-region > .widget { margin: 0 0 28px !important; }
.inner-sidebar.inner-sidebar-style-card > .vipvize-sidebar-scroll-region > .widget:last-child,
.inner-sidebar.inner-sidebar-style-plain > .vipvize-sidebar-scroll-region > .widget:last-child { margin-bottom: 0 !important; }

/* Spacing is defined centrally by the generated theme layout CSS. */
