/*prevent background-scrolling when popup enabled*/
body.popup-menu-enabled {
    overflow: hidden;
}

/* Mobile Menu Popup Styles */
.dialog-widget:has(.mrp-mobile-menu) {

    &.dialog-type-lightbox {
        z-index: 5;
    }

    & .dialog-widget-content {
        top: 0;
        left: 0;

        & .dialog-message {
            height: 100vh !important;
        }
    }

    & .popup-menu-overlay {
        padding: 6px;

        & .btn {
            margin-bottom: 12px ;
        }

        & .content {
            padding: 20px 16px;
            border-radius: var(--map-rd-corner);
            background-color: var(--Neutral-80);
            overflow-y: scroll;

            & .popup-menu-list {
                list-style: none;
                padding: 0;
                margin: 0;
                text-align: left;

                & li {
                    padding: 9px 0;

                    a {
                        font-family: var(--ff-heading);
                        font-size: 28px;
                        font-style: normal;
                        font-weight: 500;
                        line-height: 1.25em;
                        letter-spacing: 0.25px;

                        color: var(--Neutral-8);
                    }

                    /* the submenu items*/
                    &.menu-item-has-children {
                        position: relative;

                        & ul.sub-menu:not(.visible) {
                            display: none;
                        }

                        & ul.sub-menu {
                            margin-top: 10px;
                            padding-left: 0;
                            list-style-type: none;

                            & li a {
                                font-size: 18px;
                                line-height: 28px;
                            }
                        }

                        /* existential btn that indicates a submenu */
                        & .submenu-toggle {
                            position: absolute;
                            right: 0;
                            width: clamp(35px, 10vw, 100px);
                            display: inline-grid;

                        }
                    }
                }
            }

            & .popup-menu-list.submenu-open {
                & li a .submenu-toggle {
                    display: none;
                }
            }

            /*the animation to hide menu-items */
            & .popup-menu-list {

                & li.menu-item {
                    transition: all 0.3s ease-in-out;
                }

                &.submenu-open {

                    & > li.menu-item:not(.open) {
                        opacity: 0;
                        height: 0;
                        padding: 0 !important;
                    }
                }
            }

            & .back-to-parent {
                display: inline-flex;
                align-items: center;
                padding-left: 0;
                transition: all 0.3s ease-in-out;
                line-height: 28px;
                position: relative;

                &:before {
                    content:none;
                    height: 28px;
                }

                &.active {
                    padding-left: 28px;

                    &:before {
                        content: url("/wp-content/themes/mediaapparat/assets/icons/arrow-sm-light.svg");
                        position: absolute;
                        left: 0;
                    }
                }

            }
        }

    }
        @media screen and (max-width: 767px) {
            li.language-switcher.menu-item {
                display: none !important;
            }
        }

}