/**
 * ailhj-sidebar-nav.css - 侧边栏导航组件样式
 */

/* ========== 导航整体 ========== */
.ailhj-sidebar-nav {
    background: none;
    border-radius: 12px;
}

/* ========== 导航菜单 ========== */
.ailhj-sidenav-menu {
    padding: 0 8px;
    margin-bottom: 20px;
}

.ailhj-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ailhj-nav-item {
    margin-bottom: 8px;
}

.ailhj-nav-item:last-child {
    margin-bottom: 0;
}

.ailhj-nav-link {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--main-color);
    font-size: 14px;
    transition: all 0.2s ease;
}

.ailhj-nav-link:hover {
    background: var(--muted-bg-color);
    color: var(--key-color);
}

.ailhj-nav-item.active .ailhj-nav-link {
    background: var(--ailhj-blue);
    color: #fff;
    font-weight: 500;
}

/* 导航图标 */
.ailhj-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    flex-shrink: 0;
}

.ailhj-nav-icon i {
    font-size: 16px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 子比 SVG 图标支持 */
.ailhj-nav-icon i svg.svg-icon {
    width: 16px;
    height: 16px;
    display: block;
}

/* SVG 图标 */
.ailhj-nav-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--muted-color);
    transition: fill 0.2s ease;
}

/* 图片图标 */
.ailhj-nav-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}


.ailhj-nav-item.active .ailhj-nav-icon svg,
.ailhj-nav-item.active .ailhj-nav-icon i {
    color: #fff;
}

.ailhj-nav-item.active .ailhj-nav-icon svg,
.ailhj-nav-item.active .ailhj-nav-icon i svg.svg-icon {
    fill: #fff;
}

.ailhj-nav-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 响应式优化 ========== */
@media (max-width: 768px) {
    .ailhj-sidebar-nav {
        border-radius: 0;
    }
    
    .ailhj-sidenav-menu {
        padding: 6px;
    }
    
    .ailhj-nav-link {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* ========== 后台样式 ========== */
.ailhj-nav-items-wrapper {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

.ailhj-nav-items-wrapper h4 {
    margin: 0 0 15px;
    font-size: 14px;
}

.ailhj-nav-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ailhj-drag-handle {
    cursor: move;
    color: #999;
    font-size: 16px;
}

.ailhj-nav-item-row input.small-text {
    width: 120px;
}

.ailhj-nav-item-row input.ailhj-icon-input {
    width: 150px;
}

.ailhj-nav-item-row label {
    font-size: 12px;
    white-space: nowrap;
}

.ailhj-nav-item-row select {
    width: 100px;
}

.ailhj-add-item {
    margin-top: 10px;
}
