/**
 * Nexal Mobile Menu Styles
 */



/* Elementor Content Block 面板样式 */
div.ct-panel-actions {
    background-color: #202122 !important;
    height: 60px !important;
    padding-inline: 5vw !important;
    padding-top: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 16px !important;
}

button.ct-toggle-close {
    padding: 0 !important;
    margin-inline: 0 !important;
    order: -1 !important;
}

/* Logo 样式 */
.nexal-header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    order: 0 !important;
}

.nexal-logo-image {
    max-height: 100%;
    max-width: 100%;
    display: block;
    object-fit: contain;
}

.nexal-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    font-weight: 700;
    color: #fff;
}

/* 搜索按钮样式 */
.nexal-header-search {
    background: none !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: opacity 0.2s !important;
    margin-left: auto !important;
    order: 1 !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
}

.nexal-header-search svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.nexal-header-search:hover {
    opacity: 0.7;
}

.ct-panel-content-inner {
    padding: 33px 5vw !important;
}

/* 内联菜单容器 */
.nexal-menu-inline {
    width: 100%;
    max-width: 100%;
    background: transparent;
    padding: 60px 0 0 0;
    margin: 0;
    box-sizing: border-box;
}

.nexal-menu-inline-content {
    position: relative;
    overflow: hidden;
    min-height: auto;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    padding: 0;
}

/* 触发按钮（保留用于其他用途） */
.nexal-mobile-menu-trigger {
    display: inline-block;
    padding: 10px 20px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.nexal-mobile-menu-trigger:hover {
    background: #2a2a2a;
}

/* Widget 容器 */
.nexal-mobile-menu-widget {
    display: inline-block;
}

/* 遮罩层 */
.nexal-mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nexal-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 菜单容器 */
.nexal-mobile-menu-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.nexal-mobile-menu-overlay.active .nexal-mobile-menu-container {
    transform: translateX(0);
}

/* 顶部栏 */
.nexal-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #1a1a1a;
    color: #fff;
    flex-shrink: 0;
}

.nexal-menu-close,
.nexal-menu-search {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.nexal-menu-close:hover,
.nexal-menu-search:hover {
    opacity: 0.7;
}

.nexal-menu-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
}

.nexal-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    font-weight: 700;
}

/* 菜单内容 */
.nexal-mobile-menu-content,
.nexal-menu-inline-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.nexal-menu-level {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 内联菜单的 level 样式 */
.nexal-menu-inline-content .nexal-menu-level {
    position: absolute;
    padding: 0;
}

.nexal-menu-level.active {
    position: relative;
    transform: translateX(0);
    opacity: 1;
}

.nexal-menu-level.slide-out {
    transform: translateX(-100%);
    opacity: 0;
}

.nexal-menu-level.slide-in-from-right {
    transform: translateX(0);
    opacity: 1;
}

/* 菜单标题 */
.nexal-menu-title {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
    margin: 0 0 20px 0;
    text-transform: capitalize;
    width: 100%;
}

/* 菜单列表 */
.nexal-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.nexal-menu-item {
    margin-bottom: 4px;
    width: 100%;
}

.nexal-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 24px;
    color: #6b7280;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s;
    width: 100%;
}

.nexal-menu-link:hover {
    color: #1f2937;
}

.nexal-menu-arrow {
    color: #292A2B;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: auto;
}

.nexal-has-submenu .nexal-menu-link:hover .nexal-menu-arrow {
    transform: rotate(90deg);
}

/* 二级菜单 */
.nexal-submenu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    cursor: pointer;
}

.nexal-submenu-header svg {
    color: #2563eb;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.nexal-submenu-header:hover svg {
    opacity: 0.7;
}

.nexal-submenu-title {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
    margin: 0;
    line-height: 1;
}

/* 响应式 */
@media (min-width: 769px) {
    /* 在桌面端也可以显示，由用户控制 */
}

/* 在 Elementor 编辑器中隐藏遮罩层 */
.elementor-editor-active .nexal-mobile-menu-overlay {
    display: none !important;
}

/* 滚动条样式 */
.nexal-mobile-menu-container::-webkit-scrollbar,
.nexal-menu-level::-webkit-scrollbar {
    width: 6px;
}

.nexal-mobile-menu-container::-webkit-scrollbar-track,
.nexal-menu-level::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nexal-mobile-menu-container::-webkit-scrollbar-thumb,
.nexal-menu-level::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.nexal-mobile-menu-container::-webkit-scrollbar-thumb:hover,
.nexal-menu-level::-webkit-scrollbar-thumb:hover {
    background: #555;
}
