& when (@media-common = true) {
    .menu-style-2 {
        .page-header{
            .ox-megamenu {
                > ul{
                    padding:0;
                    > .level0{
                        margin:0;
                        height:100%;
                        > .ox-mm-a-wrap {
                            height:100%;
                            .level-top{
                                padding: 6px 20px;
                                height:100%;
                                display: flex;
                                align-items: center;
                                &:before{
                                    height: 4px;
                                    transition: transform 0.6s ease-in-out;
                                    bottom: 0;
                                    transform-origin: bottom;
                                }
                            }
                        }
                        &.active,
                        &:hover{                            
                            > .ox-mm-a-wrap .level-top{
                                color: var(--oxmm-style2-color, @main-color);
                                &:before{
                                    transition: all 100ms;
                                }
                            }
                        }
                    }
                }            
            }
        }
    }

    .menu-style-5{
        .page-header{
            .header-nav-wide{
                min-height: 60px;
                align-items: stretch;
                .ox-megamenu {
                    height: auto;
                }
            }
        }
    }
    .menu-style-2,
    .menu-style-4 {
        .page-header{
            .header-nav-wide{
                padding: 0;
                min-height: 60px;
                align-items: stretch;
                .ox-megamenu{
                    height: auto;
                }
            }
        }
    }
    .menu-style-2 {
        .page-header{
            .header-nav-wide{
                .ox-megamenu {
                    > ul > .level0 > .ox-mm-a-wrap .level-top:before{
                        height: ~"calc(100% - 12px)";
                    }
                }
            }
        }
    }

    .ox-mm-resize{
        &:is(.menu-style-5,
        .menu-style-4,
        .menu-style-2){
            .page-header{
                .ox-megamenu{
                    > ul > .level0{
                        height: auto;
                        > .ox-mm-a-wrap .level-top{
                            min-height: 16px;
                            .ox-megamenu-label{
                                top: ~"-5px";
                            }
                        }
                    }                
                }
            }
        }
        &.menu-style-2{
            .page-header{
                .ox-megamenu{
                    > ul > .level0{
                        > .ox-mm-a-wrap .level-top{
                            &:before{
                                height: 100%;
                            }
                        }
                    }                
                }
            }
        }
    }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
    .menu-style-5{
        .page-header{
            .ox-megamenu{
                height:100%;   
                > ul{
                    > .level0{
                        height:100%;
                        > .ox-mm-a-wrap {
                            height:100%;
                            .level-top{
                                height:100%;
                                display: flex;
                                align-items: center;
                            }
                        }
                    }
                }
            }
        }
    }
    .menu-style-2 {
        .page-header{
            .ox-megamenu{
                height:100%;
                > ul{
                    padding:0;
                    > .level0{
                        > .ox-mm-a-wrap .level-top{
                            &:before{
                                height: ~"calc(100% - 15px)";
                                top: 0;
                                transform-origin: top;
                                transition: transform 0.5s cubic-bezier(0.85,0,0.12,1);
                            }
                        }
                        &.active,
                        &:hover{
                            > .ox-mm-a-wrap .level-top{
                                &:before{
                                    transition: transform 0.2s cubic-bezier(0.85,0,0.12,1);
                                }
                            }
                        }
                    }
                }            
            }
        }
    }


    .menu-style-3{
        .page-header{
            .ox-megamenu {
                > ul{
                    > .level0{
                        > .ox-mm-a-wrap {
                            .level-top,
                            a{
                                margin:0 9px;
                                padding: 0;
                                background:none!important;
                                &:before {
                                    transform: scaleY(1);
                                    opacity:0;
                                    transition: opacity 0.2s ease;
                                    height:2px;
                                    top:auto;
                                    bottom:0;
                                }
                            }
                        }
                        &.has-active,
                        &.active,
                        &:hover{
                            > .ox-mm-a-wrap a{
                                &:before {
                                    opacity:1;
                                }
                            }
                        }            
                    }
                }
            }
        }
    }

    .menu-style-4{
        .page-header{
            &.ox-sticky.sticky.resize{
                .ox-megamenu{
                    min-height: @header-sticky-height;
                }
            }
            .ox-megamenu{
                height: 100%;
                > ul{
                    padding:0;
                    > .level0{
                        margin: 0;
                        height: 100%;
                        > .ox-mm-a-wrap {
                            height:100%;
                            .level-top,
                            a{
                                background:none!important;
                                padding: 6px 20px;
                                height:100%;
                                display: flex;
                                align-items: center;                            
                                &:before {
                                    transform: scaleY(1);
                                    opacity:0;
                                    transition: opacity 0.2s ease;
                                    height:2px;
                                    top:auto;
                                    bottom:0;
                                }
                            }
                        }
                        &.has-active,
                        &.active,
                        &:hover{
                            > .ox-mm-a-wrap a{
                                &:before {
                                    opacity:1;
                                }
                            }
                        }            
                    }
                }
            }
        }
    }
}