/*
 * NMU Menu Sidebar Scroll v2.1.1
 *
 * Principles:
 * - The category list keeps its own scroll position.
 * - Page scrolling never drives the category-list scrollTop.
 * - No visible scrollbar or arrow controls.
 * - Neutral, clearly visible fades only when more content exists above/below.
 * - No viewport breakpoint is required.
 */

.elementor-widget-jet-nav-menu.nmu-menu-scroll-enabled:not(.elementor-sticky__spacer)
.menu-menu-sidebar-container {
    max-height: var(--nmu-menu-scroll-max-height, 70vh);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;

    /* Allow wheel/trackpad input to continue to the page at either edge. */
    overscroll-behavior-y: auto;

    /* Keep native scrolling, but make the scrollbar visually disappear. */
    scrollbar-width: none;
    -ms-overflow-style: none;

    /* Avoid browser scroll anchoring changing the menu position. */
    overflow-anchor: none;

    /* Default: no fade until JS confirms hidden content. */
    -webkit-mask-image: none;
    mask-image: none;
}

.elementor-widget-jet-nav-menu.nmu-menu-scroll-enabled:not(.elementor-sticky__spacer)
.menu-menu-sidebar-container::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/*
 * Stronger neutral fade area: ~32px.
 * Uses a mask instead of a colored overlay, so it remains brand-neutral
 * on both Applebee's and IHOP backgrounds.
 */

/* More categories exist below. */
.elementor-widget-jet-nav-menu.nmu-menu-scroll-enabled.nmu-menu-can-scroll-down:not(.elementor-sticky__spacer)
.menu-menu-sidebar-container {
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0,
        #000 calc(100% - 32px),
        rgba(0, 0, 0, 0.45) calc(100% - 12px),
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0,
        #000 calc(100% - 32px),
        rgba(0, 0, 0, 0.45) calc(100% - 12px),
        transparent 100%
    );
}

/* More categories exist above. */
.elementor-widget-jet-nav-menu.nmu-menu-scroll-enabled.nmu-menu-can-scroll-up:not(.elementor-sticky__spacer):not(.nmu-menu-can-scroll-down)
.menu-menu-sidebar-container {
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0,
        rgba(0, 0, 0, 0.45) 12px,
        #000 32px,
        #000 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0,
        rgba(0, 0, 0, 0.45) 12px,
        #000 32px,
        #000 100%
    );
}

/* More categories exist in both directions. */
.elementor-widget-jet-nav-menu.nmu-menu-scroll-enabled.nmu-menu-can-scroll-up.nmu-menu-can-scroll-down:not(.elementor-sticky__spacer)
.menu-menu-sidebar-container {
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0,
        rgba(0, 0, 0, 0.45) 12px,
        #000 32px,
        #000 calc(100% - 32px),
        rgba(0, 0, 0, 0.45) calc(100% - 12px),
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0,
        rgba(0, 0, 0, 0.45) 12px,
        #000 32px,
        #000 calc(100% - 32px),
        rgba(0, 0, 0, 0.45) calc(100% - 12px),
        transparent 100%
    );
}
