/**
 * 移动端导航菜单布局修复
 * 调整导航菜单整体位置，确保关闭按钮不被遮挡
 */

/* 移动端导航菜单内侧容器 */
.wmmb-mobile-popup-drawer .wmmb-mobile-popup-inner {
    /* 将菜单整体往下移55px */
    top: 55px !important;
    bottom: 20px !important;
    height: calc(100% - 75px) !important;
}

/* 移动端导航菜单头部区域 */
.wmmb-mobile-popup-header {
    /* 确保头部区域有足够的空间 */
    min-height: 50px !important;
    padding: 10px !important;
}

/* 关闭按钮样式调整 */
#menu-toggle-close {
    /* 确保关闭按钮在第一排且可见 */
    position: relative !important;
    z-index: 100004 !important;
    margin: 5px !important;
    padding: 10px !important;
    background-color: transparent !important;
    border: none !important;
    /* 增大点击区域 */
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    /* 添加悬停效果 */
    transition: all 0.3s ease !important;
    /* 将按钮往下移5px */
    top: 5px !important;
}

/* 关闭按钮悬停效果 */
#menu-toggle-close:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-radius: 50% !important;
}

/* 关闭按钮激活效果 */
#menu-toggle-close:active {
    background-color: rgba(0, 0, 0, 0.2) !important;
    transform: scale(0.95) !important;
}

/* 关闭按钮图标 */
#menu-toggle-close .wmmb-svg-iconset {
    display: inline-block !important;
    width: 24px !important;
    height: 24px !important;
    /* 确保图标居中 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* 在小屏幕设备上进一步调整 */
@media (max-width: 544px) {
    .wmmb-mobile-popup-drawer .wmmb-mobile-popup-inner {
        /* 在小屏幕上调整位置，往下移55px */
        top: 55px !important;
        bottom: 15px !important;
        height: calc(100% - 70px) !important;
    }
    
    .wmmb-mobile-popup-header {
        min-height: 45px !important;
        padding: 8px !important;
    }
    
    #menu-toggle-close {
        padding: 8px !important;
        margin: 3px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        /* 将按钮往下移5px */
        top: 5px !important;
    }
}

/* 在中等屏幕设备上调整 */
@media (max-width: 921px) {
    .wmmb-mobile-popup-drawer .wmmb-mobile-popup-inner {
        top: 55px !important;
        bottom: 18px !important;
        height: calc(100% - 73px) !important;
    }
    
    .wmmb-mobile-popup-header {
        min-height: 48px !important;
        padding: 9px !important;
    }
    
    #menu-toggle-close {
        min-width: 42px !important;
        min-height: 42px !important;
        /* 将按钮往下移5px */
        top: 5px !important;
    }
}

/* 确保菜单内容区域适应新的布局 */
.wmmb-mobile-popup-content {
    /* 考虑到顶部偏移，调整内容区域 */
    padding-top: 10px !important;
    height: calc(100% - 50px) !important;
    overflow-y: auto !important;
}

/* 确保菜单在活动状态下也应用这些样式 */
.wmmb-mobile-popup-drawer.active .wmmb-mobile-popup-inner {
    top: 55px !important;
    bottom: 20px !important;
    height: calc(100% - 75px) !important;
}

/* 桌面端保持原有样式 */
.wmmb-desktop .wmmb-mobile-popup-drawer.active .wmmb-mobile-popup-inner {
    top: 0px !important;
    bottom: 0px !important;
    height: 100% !important;
}