// ------------------------- DO NOT EDIT THIS FILE ----------------------------
// ****** This file will be overwritten each time the plugin is updated *******
//
// This file is a major component of Max Mega Menu. The styling below works in
// perfect harmony with the current version of the plugin. The menu HTML
// will change as features are added to the plugin. Likewise, this CSS will be
// updated as new features are added to Max Mega Menu.
//
// If you need to apply custom styling to your menu go to Mega Menu > Menu Themes
// and enter your custom CSS into the Custom Styling area. Use the same (or more
// specific) selectors to ensure your custom CSS overrides the default CSS.

/** THIS FILE IS AUTOMATICALLY GENERATED - DO NOT MAKE MANUAL EDITS! **/
/** Custom CSS should be added to Mega Menu > Menu Themes > Custom Styling **/

.mega-menu-css-type { content: 'flex'; }
.mega-menu-last-modified-#{$time} { content: $date; }

@include resets;

#{$wrap} {
    @include desktop {
        @include background($container_background_from, $container_background_to);
    }

    @include border-radius($container_border_radius_top_left, $container_border_radius_top_right, $container_border_radius_bottom_right, $container_border_radius_bottom_left);

    &.mega-keyboard-navigation {
        .mega-menu-toggle:focus,
        .mega-toggle-block:focus,
        .mega-toggle-block a:focus,
        .mega-toggle-block .mega-search input[type=text]:focus,
        .mega-toggle-block button.mega-toggle-animated:focus,
        #{$menu} a:focus,
        #{$menu} span:focus,
        #{$menu} input:focus,
        #{$menu} li.mega-menu-item a.mega-menu-link:focus,
        #{$menu} form.mega-search-open:has(input[type=text]:focus),
        #{$menu} + button.mega-close:focus {
            outline-style: solid;
            outline-width: $keyboard_highlight_width;
            outline-color: $keyboard_highlight_color;
            outline-offset: $keyboard_highlight_offset;
        }

        .mega-toggle-block button.mega-toggle-animated:focus {
            outline-offset: 2px;
        }

        > li.mega-menu-item > a.mega-menu-link:focus {
            @include background($menu_item_background_hover_from, $menu_item_background_hover_to);
            color: $menu_item_link_color_hover;
            font-weight: $menu_item_link_weight_hover;
            text-decoration: $menu_item_link_text_decoration_hover;
            border-color: $menu_item_border_color_hover;

            @include mobile {
                color: $mobile_menu_item_link_color_hover;
                @include background($mobile_menu_item_background_hover_from, $mobile_menu_item_background_hover_to);
            }
        }
    }

    #{$menu} {
        display: flex;
        column-gap: $menu_item_spacing;
        justify-content: $menu_item_align;
        flex-wrap: wrap;
        @include padding($container_padding_top, $container_padding_right, $container_padding_bottom, $container_padding_left);

        li.mega-menu-item {
            a.mega-menu-link {
                display: flex;
                align-items: center;
                gap: 6px;

                @if $transitions == 'on' {
                    transition: background 200ms linear, color 200ms linear, border 200ms linear;
                }

                &:before {
                    display: flex;
                }

                .mega-description-group {
                    display: flex;
                    flex-direction: column;

                    .mega-menu-title,
                    .mega-menu-description {
                        line-height: 1.5;
                    }

                    .mega-menu-description {
                        font-style: italic;
                        font-size: 0.8em;
                        text-transform: none;
                        font-weight: normal;
                    }
                }
            }

            &.mega-icon-top > a.mega-menu-link {
                display: grid;
                align-content: center;
                
                &:before {
                    justify-content: center;
                }
            }

            &.mega-menu-item-has-children.mega-icon-top:not(.mega-hide-arrow) > a.mega-menu-link:before {
                grid-column: span 2;
            }

            &.mega-menu-item-has-children .mega-menu-row .mega-icon-top > a.mega-menu-link:before {
                grid-column: span 1;
            }

            &.mega-icon-right > a.mega-menu-link {
                &:before {
                    order: 1;
                }

                > span.mega-indicator {
                    order: 2;
                }
            }

            &.mega-disable-link > a.mega-menu-link,
            &.mega-menu-megamenu li.mega-disable-link > a.mega-menu-link {
                cursor: inherit;
            }

            &.mega-menu-item-has-children.mega-disable-link > a.mega-menu-link,
            &.mega-menu-megamenu > li.mega-menu-item-has-children.mega-disable-link > a.mega-menu-link  {
                cursor: pointer;
            }

            &.mega-menu-megamenu ul.mega-sub-menu li.mega-collapse-children {
                > ul.mega-sub-menu {
                    display: none;
                    flex-direction: column;
                }
                &.mega-toggle-on {
                    > ul.mega-sub-menu {
                        display: flex;
                    }
                    > a.mega-menu-link > span.mega-indicator:after {
                        content: $arrow_up;
                    }
                }
            }

            @include desktop {
                > ul.mega-sub-menu {
                    visibility: hidden;
                    display: flex;
                }

                &.mega-toggle-on > ul.mega-sub-menu {
                    visibility: visible;
                }
            }

            @include mobile {
                > ul.mega-sub-menu {
                    display: none;
                }

                &.mega-toggle-on > ul.mega-sub-menu {
                    display: flex;
                }

                &.mega-hide-sub-menu-on-mobile > a.mega-menu-link > span.mega-indicator,
                &.mega-hide-sub-menu-on-mobile > ul.mega-sub-menu {
                    display: none;
                }
            }

            > ul.mega-sub-menu {
                p {
                    margin-bottom: 10px;
                }

                input,
                img {
                    max-width: 100%;
                }
            }
        }

        > li.mega-animating > ul.mega-sub-menu {
             pointer-events: none;
        }

        @include desktop {
            &[data-effect="fade"] {
                li.mega-menu-item > ul.mega-sub-menu {
                    opacity: 0;
                    transition: opacity $effect_speed ease-in, visibility $effect_speed ease-in;
                }

                &.mega-no-js li.mega-menu-item:hover > ul.mega-sub-menu,
                &.mega-no-js li.mega-menu-item:focus > ul.mega-sub-menu,
                li.mega-menu-item.mega-toggle-on > ul.mega-sub-menu,
                li.mega-menu-item.mega-menu-megamenu.mega-toggle-on ul.mega-sub-menu {
                    opacity: 1;
                }
            }

            &[data-effect="fade_up"] {
                li.mega-menu-item.mega-menu-megamenu > ul.mega-sub-menu,
                li.mega-menu-item.mega-menu-flyout ul.mega-sub-menu {
                    opacity: 0;
                    transform: translate(0, 10px);
                    transition: opacity $effect_speed ease-in, transform $effect_speed ease-in, visibility $effect_speed ease-in;
                }

                &.mega-no-js li.mega-menu-item:hover > ul.mega-sub-menu,
                &.mega-no-js li.mega-menu-item:focus > ul.mega-sub-menu,
                li.mega-menu-item.mega-toggle-on > ul.mega-sub-menu,
                li.mega-menu-item.mega-menu-megamenu.mega-toggle-on ul.mega-sub-menu {
                    opacity: 1;
                    transform: translate(0, 0);
                }
            }

            &[data-effect="slide_up"] {
                li.mega-menu-item.mega-menu-megamenu > ul.mega-sub-menu,
                li.mega-menu-item.mega-menu-flyout ul.mega-sub-menu {
                    transform: translate(0, 10px);
                    transition: transform $effect_speed ease-in, visibility $effect_speed ease-in;
                }

                &.mega-no-js li.mega-menu-item:hover > ul.mega-sub-menu,
                &.mega-no-js li.mega-menu-item:focus > ul.mega-sub-menu,
                li.mega-menu-item.mega-toggle-on > ul.mega-sub-menu,
                li.mega-menu-item.mega-menu-megamenu.mega-toggle-on ul.mega-sub-menu {
                    transform: translate(0, 0);
                }
            }
        }

        &.mega-no-js li.mega-menu-item:hover > ul.mega-sub-menu,
        &.mega-no-js li.mega-menu-item:focus > ul.mega-sub-menu {
            visibility: visible;
        }

        li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu ul.mega-sub-menu {
            visibility: inherit;
            flex-direction: column;
        }

        @for $cols from 1 through 6 {
            li.mega-menu-item.mega-menu-megamenu ul.mega-sub-menu li.mega-#{$cols}-columns > ul.mega-sub-menu {
                display: block;
                columns: $cols;
            }
        }

        li.mega-menu-item a[class^='dashicons']:before {
            font-family: dashicons;
        }

        li.mega-align-bottom-left {
            > ul.mega-sub-menu {

            }

            &.mega-toggle-on > a.mega-menu-link {
                @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, 0px, 0px);
            }
        }

        li.mega-align-bottom-right {
            > ul.mega-sub-menu {
                right: 0;
            }

            &.mega-toggle-on > a.mega-menu-link {
                @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, 0px, 0px);
            }
        }

        @if unit($panel_width) == '%' {
            @include desktop {
                > li.mega-menu-megamenu.mega-menu-item {
                    position: static;
                }
            }
        }

        // top level items
        > li.mega-menu-item {

            @if $menu_item_divider == 'on' {
                @include desktop {
                    border-left: 1px solid $menu_item_divider_color;
                    @include box-shadow(inset 1px 0 0 0 rgba(255,255,255,$menu_item_divider_glow_opacity));

                    /* Hide divider on first menu item */
                    &:first-of-type {
                        border-left: 0;
                        @include box-shadow(none);
                    }
                }
            }

            &.mega-item-align-right {
                order: 1;
            }

            &.mega-item-align-float-left {
                order: -1;
            }

            @include desktop {
                @if $menu_item_align == 'left' {
                    &:nth-child(1 of .mega-item-align-right) {
                        margin-left: auto;
                    }
                }

                @if $menu_item_align == 'right' {
                    &:nth-last-child(1 of .mega-item-align-float-left) {
                        margin-right: auto;
                    }
                }
            }

            @include desktop {
                > a.mega-menu-link:hover,
                > a.mega-menu-link:focus {
                    @include background($menu_item_background_hover_from, $menu_item_background_hover_to);
                    color: $menu_item_link_color_hover;
                    font-weight: $menu_item_link_weight_hover;
                    text-decoration: $menu_item_link_text_decoration_hover;
                    border-color: $menu_item_border_color_hover;
                }
            }

            &.mega-toggle-on > a.mega-menu-link {
                @include background($menu_item_background_hover_from, $menu_item_background_hover_to);
                color: $menu_item_link_color_hover;
                font-weight: $menu_item_link_weight_hover;
                text-decoration: $menu_item_link_text_decoration_hover;
                border-color: $menu_item_border_color_hover;

                @include mobile {
                    color: $mobile_menu_item_link_color_hover;
                    @include background($mobile_menu_item_background_hover_from, $mobile_menu_item_background_hover_to);
                }
            }

            @if $menu_item_highlight_current == 'on' {
                &.mega-current-menu-item,
                &.mega-current-menu-ancestor,
                &.mega-current-page-ancestor {
                    > a.mega-menu-link {
                        @include background($menu_item_background_hover_from, $menu_item_background_hover_to);
                        color: $menu_item_link_color_hover;
                        font-weight: $menu_item_link_weight_hover;
                        text-decoration: $menu_item_link_text_decoration_hover;
                        border-color: $menu_item_border_color_hover;

                        @include mobile {
                            color: $mobile_menu_item_link_color_hover;
                            @include background($mobile_menu_item_background_hover_from, $mobile_menu_item_background_hover_to);
                        }
                    }
                }
            }

            > a.mega-menu-link {
                min-height: $menu_item_link_height;
                @include padding($menu_item_link_padding_top, $menu_item_link_padding_right, $menu_item_link_padding_bottom, $menu_item_link_padding_left);
                color: $menu_item_link_color;
                text-transform: $menu_item_link_text_transform;
                text-decoration: $menu_item_link_text_decoration;
                text-align: $menu_item_link_text_align;
                @include background($menu_item_background_from, $menu_item_background_to);
                @include border($menu_item_border_top, $menu_item_border_left, $menu_item_border_right, $menu_item_border_bottom, $menu_item_border_color);
                @include border-radius($menu_item_link_border_radius_top_left, $menu_item_link_border_radius_top_right, $menu_item_link_border_radius_bottom_right, $menu_item_link_border_radius_bottom_left);
                font-family: unquote($menu_item_link_font);
                font-size: $menu_item_link_font_size;
                font-weight: $menu_item_link_weight;
            }

            @include mobile {
                display: flex;
                flex-direction: column;

                > a.mega-menu-link {
                    @include border-radius(0, 0, 0, 0);
                    min-height: $mobile_menu_item_height;
                    padding: 0 10px;
                    text-align: $mobile_menu_item_link_text_align;
                    color: $mobile_menu_item_link_color;
                    font-size: $mobile_menu_item_link_font_size;
                }
            }
        }

        // sub menu items (grid)
        li.mega-menu-grid > ul.mega-sub-menu {
            flex-direction: column;

            > li.mega-menu-row {
                width: 100%;

                @if unit($panel_inner_width) == 'px' {
                    max-width: $panel_inner_width; /** Panel Width (Inner) **/
                    margin: 0 auto;
                }

                > ul.mega-sub-menu > li.mega-menu-column {
                    grid-column: span var(--span);
                }

                > ul.mega-sub-menu {
                    display: grid;
                    grid-template-columns: repeat(var(--columns), minmax(0, 1fr));

                    @include mobile {
                        @if $mobile_columns == 2 {
                            grid-template-columns: repeat(2, minmax(0, 1fr));
                        } @else {
                            grid-template-columns: repeat(1, minmax(0, 1fr));
                        }

                        > li.mega-menu-column {
                            grid-column: span 1;
                        }
                    }

                    > .mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
                        @include padding($panel_widget_padding_top, $panel_widget_padding_right, $panel_widget_padding_bottom, $panel_widget_padding_left);
                        width: 100%;
                    }
                }
            }
        }

        // sub menu items (megamenu)
        li.mega-menu-megamenu > ul.mega-sub-menu {
            flex-wrap: wrap;
            z-index: $z_index;
            max-width: none;
            @include border-radius($panel_border_radius_top_left, $panel_border_radius_top_right, $panel_border_radius_bottom_right, $panel_border_radius_bottom_left);
            @include background($panel_background_from, $panel_background_to);
            @include border($panel_border_top, $panel_border_left, $panel_border_right, $panel_border_bottom, $panel_border_color);
            @include padding($panel_padding_top, $panel_padding_right, $panel_padding_bottom, $panel_padding_left);

            @include desktop {
                position: absolute;
                width: $panel_width;
            }

            > li.mega-menu-item {
                @include mobile {
                    width: calc((1 / #{$mobile_columns})*100%);
                }

                width: calc((var(--span) / var(--columns))*100%);
            }

            @if unit($panel_width) == '%' {
                left: 0;
            }

            @if unit($panel_inner_width) == '%' and $panel_inner_width < 100% {
                padding-left: (100 - $panel_inner_width) / 2;
                padding-right: (100 - $panel_inner_width) / 2;
            }

            @if $shadow == 'on' {
                @include box-shadow($shadow_horizontal $shadow_vertical $shadow_blur $shadow_spread $shadow_color);
            }

            .mega-description-group .mega-menu-description {
                margin: 5px 0;
            }

            li.mega-menu-column > ul.mega-sub-menu ul.mega-sub-menu ul.mega-sub-menu {
                margin-left: 10px;
            }
        }

        li.mega-menu-column-standard,
        li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item {
            color: $panel_font_color;
            font-family: unquote($panel_font_family);
            font-size: $panel_font_size;
            @include padding($panel_widget_padding_top, $panel_widget_padding_right, $panel_widget_padding_bottom, $panel_widget_padding_left);

            // Widget titles
            h4.mega-block-title {
                color: $panel_header_color;
                font-family: unquote($panel_header_font);
                font-size: $panel_header_font_size;
                text-transform: $panel_header_text_transform;
                text-decoration: $panel_header_text_decoration;
                font-weight: $panel_header_font_weight;
                text-align: $panel_header_text_align;
                margin: $panel_header_margin_top $panel_header_margin_right $panel_header_margin_bottom $panel_header_margin_left;
                @include padding($panel_header_padding_top, $panel_header_padding_right, $panel_header_padding_bottom, $panel_header_padding_left);
                @include border($panel_header_border_top, $panel_header_border_left, $panel_header_border_right, $panel_header_border_bottom, $panel_header_border_color);

                &:hover {
                    border-color: $panel_header_border_color_hover;
                }
            }

            // Second level menu items
            > a.mega-menu-link {
                color: $panel_second_level_font_color;
                font-family: unquote($panel_second_level_font);
                font-size: $panel_second_level_font_size;
                text-transform: $panel_second_level_text_transform;
                text-decoration: $panel_second_level_text_decoration;
                font-weight: $panel_second_level_font_weight;
                text-align: $panel_second_level_text_align;
                margin: $panel_second_level_margin_top $panel_second_level_margin_right $panel_second_level_margin_bottom $panel_second_level_margin_left;
                @include padding($panel_second_level_padding_top, $panel_second_level_padding_right, $panel_second_level_padding_bottom, $panel_second_level_padding_left);
                @include border($panel_second_level_border_top, $panel_second_level_border_left, $panel_second_level_border_right, $panel_second_level_border_bottom, $panel_second_level_border_color);
            
                &:hover,
                &:focus {
                    border-color: $panel_second_level_border_color_hover;
                    color: $panel_second_level_font_color_hover;
                    font-weight: $panel_second_level_font_weight_hover;
                    text-decoration: $panel_second_level_text_decoration_hover;
                    @include background($panel_second_level_background_hover_from, $panel_second_level_background_hover_to);

                    > span.mega-title-below {
                        text-decoration: $panel_second_level_text_decoration_hover;
                    }
                }
            }

            // third level menu items
            li.mega-menu-item > a.mega-menu-link {
                color: $panel_third_level_font_color;
                font-family: unquote($panel_third_level_font);
                font-size: $panel_third_level_font_size;
                text-transform: $panel_third_level_text_transform;
                text-decoration: $panel_third_level_text_decoration;
                font-weight: $panel_third_level_font_weight;
                text-align: $panel_third_level_text_align;
                margin: $panel_third_level_margin_top $panel_third_level_margin_right $panel_third_level_margin_bottom $panel_third_level_margin_left;
                @include padding($panel_third_level_padding_top, $panel_third_level_padding_right, $panel_third_level_padding_bottom, $panel_third_level_padding_left);
                @include border($panel_third_level_border_top, $panel_third_level_border_left, $panel_third_level_border_right, $panel_third_level_border_bottom, $panel_third_level_border_color);
            
                &:hover,
                &:focus {
                    border-color: $panel_third_level_border_color_hover;
                    color: $panel_third_level_font_color_hover;
                    font-weight: $panel_third_level_font_weight_hover;
                    text-decoration: $panel_third_level_text_decoration_hover;
                    @include background($panel_third_level_background_hover_from, $panel_third_level_background_hover_to);

                    > span.mega-title-below {
                        text-decoration: $panel_third_level_text_decoration_hover;
                    }
                }
            }
        }

        // Sub menu items (flyout)
        > li.mega-menu-flyout ul.mega-sub-menu {
            flex-direction: column;
            @include background($flyout_menu_background_from, $flyout_menu_background_to);

            @if $shadow == 'on' {
                @include box-shadow($shadow_horizontal $shadow_vertical $shadow_blur $shadow_spread $shadow_color);
            }

            @include desktop {
                position: absolute;
                width: $flyout_width;
                z-index: $z_index;
                @include padding($flyout_padding_top, $flyout_padding_right, $flyout_padding_bottom, $flyout_padding_left);
                @include border($flyout_border_top, $flyout_border_left, $flyout_border_right, $flyout_border_bottom, $flyout_border_color);
                @include border-radius($flyout_border_radius_top_left, $flyout_border_radius_top_right, $flyout_border_radius_bottom_right, $flyout_border_radius_bottom_left);
            }

            li.mega-menu-item {

                @if $flyout_menu_item_divider == 'on' {
                    border-bottom: 1px solid $flyout_menu_item_divider_color;

                    /* Hide divider on last menu item */
                    &:last-child {
                        border-bottom: 0;
                        @include box-shadow(none);
                    }
                }

                a.mega-menu-link {
                    @include background($flyout_background_from, $flyout_background_to);
                    color: $flyout_link_color;
                    font-family: unquote($flyout_link_family);
                    font-size: $flyout_link_size;
                    font-weight: $flyout_link_weight;
                    @include padding($flyout_link_padding_top, $flyout_link_padding_right, $flyout_link_padding_bottom, $flyout_link_padding_left);
                    min-height: $flyout_link_height;
                    text-decoration: $flyout_link_text_decoration;
                    text-transform: $flyout_link_text_transform;
                }

                @include desktop {
                    &:first-child > a.mega-menu-link {
                        border-top-left-radius: $flyout_border_radius_top_left;
                        border-top-right-radius: $flyout_border_radius_top_right;
                    }
                    &:first-child > a.mega-menu-link {
                        border-top-left-radius: $flyout_border_radius_top_left;
                        border-top-right-radius: $flyout_border_radius_top_right;
                    }
                    a.mega-menu-link:hover,
                    a.mega-menu-link:focus {
                        @include background($flyout_background_hover_from, $flyout_background_hover_to);
                        font-weight: $flyout_link_weight_hover;
                        text-decoration: $flyout_link_text_decoration_hover;
                        color: $flyout_link_color_hover;
                    }
                    ul.mega-sub-menu {
                        position: absolute;
                        left: 100%;
                        top: 0;
                    }
                }

                @include mobile {
                    ul.mega-sub-menu {
                        a.mega-menu-link {
                            padding-left: 20px;
                        }

                        ul.mega-sub-menu a.mega-menu-link {
                            padding-left: 30px;
                        }
                    }
                }
            }
        }


        // Arrows
        li.mega-menu-item-has-children {
            > a.mega-menu-link > span.mega-indicator {
                display: flex;
                align-items: center;
                height: 100%;

                &:after {
                    content: $arrow_down;
                    font-family: $arrow_font;
                    font-weight: $arrow_font_weight;
                    height: 100%;
                    align-content: center;
                }
            }

            > ul.mega-sub-menu span.mega-indicator {
                margin-left: auto;
            }

            @include mobile {
                > a.mega-menu-link > span.mega-indicator {
                    margin-left: auto;
                    flex-basis: 30px;
                    justify-content: right;
                }

                &.mega-toggle-on > a.mega-menu-link > span.mega-indicator:after {
                    content: $arrow_up;
                }
            }
        }

        // Hide arrows
        li.mega-menu-megamenu:not(.mega-menu-tabbed) li.mega-menu-item-has-children:not(.mega-collapse-children) > a.mega-menu-link > span.mega-indicator,
        li.mega-menu-item-has-children.mega-hide-arrow > a.mega-menu-link > span.mega-indicator {
            display: none;
        }

        // Flyout menus
        @include desktop {
            li.mega-menu-flyout {
                li.mega-menu-item a.mega-menu-link > span.mega-indicator {
                    &:after {
                        content: $arrow_right;
                    }
                }

                &.mega-align-bottom-right {
                    li.mega-menu-item a.mega-menu-link {
                        flex-direction: row-reverse;

                        > span.mega-indicator {
                            margin-left: initial;
                            margin-right: auto;

                            &:after {
                                content: $arrow_left;
                            }
                        }
                    }
                    
                    ul.mega-sub-menu li.mega-menu-item ul.mega-sub-menu {
                        right: 100%;
                        left: auto;
                        top: 0;
                    }
                }
            }
        }

        // PolyLang Language Switcher
        li[class^='mega-lang-item'] > a.mega-menu-link > img {
            display: inline;
        }

        // WPML Flags
        a.mega-menu-link > img.wpml-ls-flag,
        a.mega-menu-link > img.iclflag {
            display: inline;
            margin-right: 8px;
        }

        @include mobile {
            li.mega-hide-on-mobile {
                display: none;
            }
        }

        @include desktop {
            li.mega-hide-on-desktop {
                display: none;
            }
        }
    }

    .mega-menu-toggle {
        display: none;

        ~ button.mega-close {
            visibility: hidden;
            opacity: 0;
            transition: left $effect_speed_mobile ease-in-out, right $effect_speed_mobile ease-in-out, visibility $effect_speed_mobile ease-in-out, opacity $effect_speed_mobile ease-out;
        }

        @if $effect_mobile == slide_left {
            & ~ button.mega-close {
                right: 0;
                left: auto;
            }
        }

        @if $effect_mobile == slide_right {
            & ~ button.mega-close {
                right: auto;
                left: 0;
            }
        }

        @include mobile {
            z-index: 1;
            cursor: pointer;
            @include background($toggle_background_from, $toggle_background_to);
            @include border-radius($toggle_bar_border_radius_top_left, $toggle_bar_border_radius_top_right, $toggle_bar_border_radius_bottom_right, $toggle_bar_border_radius_bottom_left);
            line-height: $toggle_bar_height;
            height: $toggle_bar_height;
            text-align: left;
            user-select: none;
            outline: none;
            white-space: nowrap;

            @if $disable_mobile_toggle == on {
                display: none;
            } @else {
                display: flex;
            }

            img {
                max-width: 100%;
                padding: 0;
            }

            .mega-toggle-blocks-left,
            .mega-toggle-blocks-center,
            .mega-toggle-blocks-right {
                display: flex;
                flex-basis: 33.33%;
            }

            .mega-toggle-block {
                display: flex;
                height: 100%;
                outline: 0;
                align-self: center;
                flex-shrink: 0;
            }
            
            .mega-toggle-blocks-left {
                flex: 1;
                justify-content: flex-start;

                .mega-toggle-block {
                    margin-left: 6px;

                    &:only-child {
                        margin-right: 6px;
                    }
                }
            }

            .mega-toggle-blocks-center {
                justify-content: center;

                .mega-toggle-block {
                    margin-left: 3px;
                    margin-right: 3px;
                }
            }

            .mega-toggle-blocks-right {
                flex: 1;
                justify-content: flex-end;

                .mega-toggle-block {
                    margin-right: 6px;

                    &:only-child {
                        margin-left: 6px;
                    }
                }
            }

            + #{$menu} {
                flex-direction: column;
                flex-wrap: nowrap;
                @include background($mobile_background_from, $mobile_background_to);
                @include padding($mobile_menu_padding_top, $mobile_menu_padding_right, $mobile_menu_padding_bottom, $mobile_menu_padding_left);
                
                @if $disable_mobile_toggle == on {
                    display: flex; 
                } @else {
                    display: none;

                    @if $mobile_menu_overlay == on or $mobile_menu_force_width == on {
                        position: absolute;
                        width: 100%;
                        z-index: 9999999;
                    }
                }

                @if ( ( $effect_mobile == slide_right or $effect_mobile == slide_left ) and $disable_mobile_toggle == off ) {
                    position: fixed;
                    width: $mobile_menu_off_canvas_width;
                    max-width: 100%;
                    height: 100dvh;
                    max-height: 100dvh;
                    top: 0;
                    box-sizing: border-box;
                    transition: left $effect_speed_mobile ease-in-out, right $effect_speed_mobile ease-in-out, visibility $effect_speed_mobile ease-in-out;
                    overflow-y: auto;
                    overflow-x: hidden;
                    z-index: 9999999999;
                    overscroll-behavior: contain;
                    visibility: hidden;
                    display: flex;
                }
            }

            &.mega-menu-open { 
                & + #{$menu} {
                    display: flex;
                    visibility: visible;
                }
            }

            @if ( ( $effect_mobile == slide_right or $effect_mobile == slide_left ) and $disable_mobile_toggle == off ) {
                position: relative;

                & ~ button.mega-close {
                    display: flex;
                    position: fixed;
                    top: 0;
                    z-index: 99999999999;
                    cursor: pointer;

                    &:before {
                        display: flex;
                        content: $close_icon;
                        font-family: $close_icon_font;
                        font-weight: $close_icon_font_weight;
                        color: $close_icon_color;
                        align-items: center;
                        justify-content: center;
                        width: 40px;
                        height: 40px;
                        font-size: $close_icon_font_size;
                    }
                }

                @if ($effect_mobile == slide_right ) {
                    + #{$menu} {
                        left: -$mobile_menu_off_canvas_width;
                    }

                    &.mega-menu-open {
                        & ~ button.mega-close {
                            visibility: visible;
                            opacity: 1;
                            
                            @if $mobile_menu_off_canvas_width == '100%' {
                                left: auto;
                                right: 0;
                            } @else {
                                left: min(calc(100vw - 40px), #{$mobile_menu_off_canvas_width});
                                right: auto;
                            }
                        }

                        & + #{$menu} {
                            left: 0;
                        }
                    }
                }

                @if ($effect_mobile == slide_left ) {
                    + #{$menu} {
                        right: -$mobile_menu_off_canvas_width;
                    }
                    
                    &.mega-menu-open {
                        & ~ button.mega-close {
                            visibility: visible;
                            opacity: 1;

                            @if $mobile_menu_off_canvas_width == '100%' {
                                right: auto;
                                left: 0;
                            } @else {
                                right: min(calc(100vw - 40px), #{$mobile_menu_off_canvas_width});
                                left: auto;
                            }
                        }

                        & + #{$menu} {
                            right: 0;
                        }
                    }
                }

                &.mega-menu-open:after {
                    position: fixed;
                    width: 100%;
                    height: 99999px;
                    content: "";
                    top: 0;
                    left: 0;
                    opacity: 0.5;
                    background: black;
                    cursor: pointer;
                    z-index: 9999999998;
                }
            }
        }
    }
}

@if ( ( $effect_mobile == slide_right or $effect_mobile == slide_left ) and $disable_mobile_toggle == off ) {
    html.mega-menu-#{$location}-off-canvas-open {
        overflow: hidden;
        height: auto;
        
        body {
            overflow: hidden;
            height: auto;
        }

        #wpadminbar {
           z-index: 0;
        }
    }
}