/* ============================================
   nav.css - 公共导航栏样式
   移动端菜单：全屏弹层模式
   ============================================ */

/* 移动端菜单默认隐藏 */
#xwMobileMenu.xw-mobile-menu-hidden {
    display: none;
}

/* ===== 移动端菜单遮罩层 ===== */
.xw-mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    z-index: 1040;
    transition: background 0.3s ease;
}

.xw-mobile-overlay.show {
    display: block;
}

.xw-mobile-overlay.xw-mobile-overlay-visible {
    background: rgba(0, 0, 0, 0.5);
}

/* ===== 移动端全屏菜单面板 ===== */
#xwMobileMenu.xw-mobile-menu-open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80vw;
    max-width: 340px;
    background: #fff;
    z-index: 1050;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 0;
    overflow: hidden;
}

#xwMobileMenu.xw-mobile-menu-visible {
    transform: translateX(0);
}

/* 菜单头部 */
.xw-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, var(--xw-primary, #2563eb), var(--xw-primary-dark, #1d4ed8));
    color: #fff;
    flex-shrink: 0;
}

.xw-mobile-menu-title {
    font-size: 18px;
    font-weight: 600;
}

.xw-mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s;
}

.xw-mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 菜单主体（可滚动区域） */
.xw-mobile-menu-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 0;
}

/* 菜单链接列表 */
.xw-mobile-menu-links {
    display: flex;
    flex-direction: column;
    padding: 0 12px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.xw-mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    border-radius: 10px;
    transition: all 0.2s;
}

.xw-mobile-menu-links a:hover,
.xw-mobile-menu-links a.active {
    background: var(--xw-primary-50, #eff6ff);
    color: var(--xw-primary, #2563eb);
}

.xw-mobile-menu-links a i {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

/* 菜单底部操作区 */
.xw-mobile-menu-footer {
    padding: 12px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    flex-shrink: 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
}

.xw-mobile-auth-btns {
    display: flex;
    gap: 10px;
}

.xw-btn-block {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s;
}
