/* 파일 트리 기본 구조 */
.tree-children {
    display: none;
    margin-left: 0;
}

.tree-children.expanded {
    display: block;
}

/* 트리 노드 확장 버튼 */
.tree-expand {
    cursor: pointer;
    user-select: none;
    display: inline-block;
    width: 16px;
    text-align: center;
    margin-right: 4px;
}

.tree-expand:hover {
    background-color: rgba(0, 120, 212, 0.1);
    border-radius: 2px;
}

.tree-expand-placeholder {
    display: inline-block;
    width: 16px;
    margin-right: 4px;
}

/* 트리 노드 컨텐츠 */
.tree-node-content {
    display: flex;
    align-items: center;
    padding: 2px 4px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    position: relative;
    min-height: 20px;
    white-space: nowrap; /* 폴더명 줄바꿈 방지 */
    overflow: visible; /* 내용이 보이도록 */
}

/* 호버 효과 - 연한 파란색 배경에 파란 테두리, 검은 텍스트 */
.tree-node-content:hover:not(.selected) {
    background-color: #e8f4fd !important;
    border: 1px solid #0078d4 !important;
    color: #000000 !important;
}

/* 호버시 모든 하위 요소 검정색 */
.tree-node-content:hover:not(.selected) * {
    color: #000000 !important;
}

/* 선택된 노드 - 파란색 배경에 흰색 텍스트 */
.tree-node-content.selected {
    background-color: #0078d4 !important;
    color: #ffffff !important;
    border: 1px solid #005a9e !important;
}

/* 선택된 노드의 모든 하위 요소 흰색 */
.tree-node-content.selected *:not(.tree-action) {
    color: #ffffff !important;
}

/* 트리 아이콘과 레이블 */
.tree-icon {
    margin-right: 4px;
}

.tree-label {
    flex: 1;
}

/* 트리 액션 버튼들 - 고정 위치 */
.tree-actions {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    gap: 2px;
    z-index: 10;
}

.tree-node-content:hover .tree-actions {
    display: inline-flex;
}

.tree-action {
    padding: 0 4px;
    border: 1px solid #ccc;
    background: white;
    cursor: pointer;
    font-size: 12px;
    border-radius: 2px;
}

.tree-action:hover {
    background: #f0f0f0;
}

/* 선택된 노드의 액션 버튼 */
.tree-node-content.selected .tree-actions .tree-action {
    background: #ffffff;
    color: #0078d4;
    border-color: #ffffff;
}

.tree-node-content.selected .tree-actions .tree-action:hover {
    background: #f0f0f0;
    color: #0078d4;
}
