/* Keep Norebro's right-hand navigation inside the available viewport. */
body #fullscreen-mega-menu.fullscreen-navigation {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(360px, 100vw) !important;
    max-width: 100vw;
    left: auto !important;
    right: 0 !important;
    top: var(--wn-menu-top, 0px) !important;
    height: calc(100vh - var(--wn-menu-top, 0px));
    height: calc(100dvh - var(--wn-menu-top, 0px));
    padding: 72px 24px 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}
body #fullscreen-mega-menu::after { width: 100%; pointer-events: none; }
body #fullscreen-mega-menu .site-branding { margin: 0 0 12px; max-width: 100%; }
body #fullscreen-mega-menu .fullscreen-menu-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
}
body #fullscreen-mega-menu ul.menu {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    transform: none;
}
body #fullscreen-mega-menu #secondary-menu > li > a {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 0;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}
body #fullscreen-mega-menu .copyright {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    max-width: 100%;
    margin-top: auto;
    padding-top: 28px;
    flex-shrink: 0;
    overflow-wrap: anywhere;
}
body #fullscreen-mega-menu .close { left: auto; right: 10px; }
body #fullscreen-mega-menu li div.sub-nav,
body #fullscreen-mega-menu li .sub-sub-nav,
body #fullscreen-mega-menu li .sub-sub-menu {
    position: static;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-left: 16px;
    margin: 0;
    display: none;
}
body #fullscreen-mega-menu li div.sub-nav.open,
body #fullscreen-mega-menu li:hover > .sub-sub-nav,
body #fullscreen-mega-menu li:focus-within > .sub-sub-nav,
body #fullscreen-mega-menu li:hover > .sub-sub-nav > .sub-sub-menu,
body #fullscreen-mega-menu li:focus-within > .sub-sub-nav > .sub-sub-menu {
    display: block;
    visibility: visible;
    opacity: 1;
}
body #fullscreen-mega-menu li div.sub-nav ul {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 0;
}
body #fullscreen-mega-menu li div.sub-nav a {
    box-sizing: border-box;
    padding: 6px 28px 6px 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
body #fullscreen-mega-menu li.has-submenu > a::after,
body #fullscreen-mega-menu li.has-submenu > a::before { right: 4px; }
body #fullscreen-mega-menu li.has-submenu > a { padding-right: 32px; }
#masthead .hamburger[role="button"]:focus-visible,
#fullscreen-mega-menu [role="button"]:focus-visible,
#masthead #site-navigation [role="button"]:focus-visible {
    outline: 2px solid #92278f;
    outline-offset: -3px;
}
@media (max-width: 768px) {
    body #masthead #site-navigation.main-nav {
        box-sizing: border-box;
        max-width: 100vw;
        top: var(--wn-menu-top, 0px) !important;
        height: calc(100vh - var(--wn-menu-top, 0px));
        height: calc(100dvh - var(--wn-menu-top, 0px));
        overscroll-behavior: contain;
    }
    body #masthead #site-navigation.main-nav.active {
        width: 100% !important;
        left: auto !important;
        right: 0 !important;
    }
    body #masthead #site-navigation #mega-menu-wrap { width: 100%; }
    body #masthead #site-navigation #secondary-menu { max-width: 100%; }
    body #masthead #site-navigation #secondary-menu a {
        box-sizing: border-box;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
