/**
 * Windows 资源管理器风格树状样式
 */

/* 树状行包装器 */
.win-tree-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* 树状连接线容器 */
.win-tree-lines {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* 垂直连接线 */
.win-tree-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(139, 148, 158, 0.4);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1;
}

/* 空白占位 */
.win-tree-space {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* T型连接线 ├─ */
.win-tree-tee {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(139, 148, 158, 0.5);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1;
}

/* 拐角连接线 └─ */
.win-tree-corner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: rgba(139, 148, 158, 0.5);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1;
}

/* 展开/折叠按钮 */
.win-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin: 0 2px;
    border-radius: 3px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.win-expand-btn:hover {
    background: rgba(88, 166, 255, 0.2);
    color: var(--text-primary);
}

.win-expand-btn.expanded {
    color: var(--accent-primary);
}

/* 展开按钮占位符（无子项时） */
.win-expand-placeholder {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 2px;
    flex-shrink: 0;
}

/* 文件夹图标 */
.win-folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 4px;
}

/* 文件夹名称 */
.win-folder-text {
    font-size: 13px;
    margin-right: 6px;
}

/* 文件计数 */
.win-folder-count {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* 文件占位符（对齐用） */
.win-file-placeholder {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0 2px;
    flex-shrink: 0;
}

/* 文件图标 */
.win-tree-wrapper .file-icon {
    margin-right: 4px;
}

/* 文件名称 */
.win-file-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 6px;
}

/* 文件夹行悬停效果 */
.win-folder-row:hover .win-folder-text {
    color: var(--accent-primary);
}

/* 文件行悬停效果 */
.win-file-row:hover .win-file-text {
    color: var(--text-primary);
}

/* 不同层级的缩进微调 */
.folder-level-0 .win-tree-lines {
    /* 根级无缩进 */
}

.folder-level-1 .win-tree-lines {
    /* 一级缩进 */
}

/* 选中行样式优化 */
.batch-selected .win-tree-wrapper {
    opacity: 1;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .win-tree-line,
    .win-tree-space,
    .win-tree-tee,
    .win-tree-corner {
        width: 16px;
        height: 16px;
        font-size: 11px;
    }
    
    .win-expand-btn,
    .win-expand-placeholder {
        width: 14px;
        height: 14px;
    }
    
    .win-folder-icon {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
    
    .win-folder-text,
    .win-file-text {
        font-size: 12px;
    }
}
