/* Only the reviewed TEST theme navigation. No document overflow masking. */
#primary-menu-custom-id ul.edubin-dropdown-menu {
    max-width: calc(100vw - 16px);
}
#primary-menu-custom-id ul.mae-menu-align-end {
    left: auto !important;
    right: 0 !important;
}
#primary-menu-custom-id ul.mae-menu-open-left {
    left: auto !important;
    right: 100% !important;
}
#mae-theme-mobile-navigation {
    --mae-toolbar-offset: 0px;
    top: var(--mae-toolbar-offset);
    bottom: auto;
    height: calc(100vh - var(--mae-toolbar-offset));
    height: calc(100dvh - var(--mae-toolbar-offset));
    box-sizing: border-box;
    overflow-y: auto;
}
/* Preserve original link destinations while revealing their submenu on keyboard focus. */
#primary-menu-custom-id li:focus-within > ul.edubin-dropdown-menu {
    visibility: visible;
    opacity: 1;
}
/* Toolbar clearance and viewport height must not inherit the theme's transition: all. */
#mae-theme-mobile-navigation {
    transition-property: left, right, transform, opacity !important;
}
/* A newly focused submenu must be tabbable immediately, not after the hover fade. */
#primary-menu-custom-id li:focus-within > ul.edubin-dropdown-menu {
    transition: none !important;
}

/* Theme links also transition inherited visibility. Keep keyboard traversal
 * immediate throughout the focused submenu, not only on its outer UL. */
#primary-menu-custom-id li:focus-within > ul.edubin-dropdown-menu :is(li, a) {
    transition: none !important;
}
