/**
 * 底部 Dock 导航栏样式模块（macOS 风格）
 * 包含主布局、Dock 条、图标样式、动画效果等
 * 符合代码规范：<400行
 */

/* 主布局容器 - 内容区占满到底，Dock 悬浮不占流、不影响高度 */
.main-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    gap: 0;
}

/* 顶部 Dock 导航栏（Logo 右侧，参与头部布局） */
.sidebar-navigation {
    position: relative;
    min-height: 56px;
    height: 56px;
    max-height: 56px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    overflow: visible;
    z-index: 100;
    max-width: fit-content;
    flex-shrink: 0;
}

/* 导航项（无图标底框，仅图标+文字） */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    height: 56px;
    min-height: 56px;
    padding: 6px 8px 6px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--text-secondary);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    text-align: center;
    box-sizing: border-box;
}

/* 导航项图标容器（20×20） */
.nav-item-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: inherit;
}

.nav-item-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* 导航项文字 - 始终在图标下方显示，清晰渲染 */
.nav-item-text {
    display: block;
    font-size: 11px;
    line-height: 1.25;
    color: inherit;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 导航项 hover 状态（轻微上浮，弱背景反馈） */
.nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: none;
}

.nav-item:hover .nav-item-icon {
    transform: scale(1.1);
}

/* 导航项激活状态（仅颜色 + 底部小点，不带额外背景块） */
.nav-item.active {
    background: transparent;
    color: var(--text-accent);
    box-shadow: none;
}

/* 激活指示条（Dock 底部小条，类似 macOS） */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(-50%);
    width: 4px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* 独立按钮无分隔线 */
.nav-item::after {
    display: none;
}

/* 面板容器区域（默认显示到页面底部，Dock 悬浮不占布局、不挤压高度） */
.panel-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    width: 100%;
    height: 100%;
    position: relative;
}

/* 面板内容 */
.panel-content {
    display: none;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    animation-duration: 0.4s;
    animation-fill-mode: both;
}

/* 激活的面板 */
.panel-content.active {
    display: flex;
    flex-direction: column;
}

/* 项目面板（原审核面板）内的content-area样式 - 融合一体容器 */
.panel-content .content-area {
    display: flex !important; /* 确保横向排列（左右布局） */
    flex-direction: row !important;
    gap: 0;
    flex: 1;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    margin-top: 0;
    /* 融合一体样式 - 参考素材市场 */
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(20px);
    position: relative;
}

.panel-content .content-area:hover {
    border-color: var(--border-secondary);
    box-shadow: var(--shadow-lg);
}

/* 确保文件夹列表和内容容器正确排列 */
.panel-content .content-area .folder-list-container,
.panel-content .content-area .folder-content-container {
    display: flex;
    flex-direction: column;
}

/* 面板切换动画 - 淡入 */
@keyframes panelFadeIn {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 面板切换动画 - 淡出 */
@keyframes panelFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-10px);
    }
}

/* 面板显示动画 */
.panel-content.showing {
    animation-name: panelFadeIn;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 面板隐藏动画 */
.panel-content.hiding {
    animation-name: panelFadeOut;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 占位面板样式 */
.panel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: var(--spacing-xl);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-primary);
    color: var(--text-muted);
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
    text-align: center;
}

.panel-placeholder-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.panel-placeholder-icon svg {
    width: 64px;
    height: 64px;
    stroke: var(--text-muted);
    fill: none;
}

.panel-placeholder-text {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Dock 内滚动条（横向时一般不显示） */
.sidebar-navigation::-webkit-scrollbar {
    height: 4px;
}

.sidebar-navigation::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-navigation::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 2px;
}

.sidebar-navigation::-webkit-scrollbar-thumb:hover {
    background: var(--border-secondary);
}

/* 响应式处理 - 仅在桌面端显示 */
@media (min-width: 1024px) {
    .sidebar-navigation {
        display: flex;
    }
}

/* 确保导航栏在移动端不显示（如果需要完全隐藏） */
@media (max-width: 1023px) {
    .sidebar-navigation {
        display: none;
    }
    
    .panel-container {
        width: 100%;
    }
}
