/* 구분선 스타일 - 드래그 가능 표시 */
.splitter {
    width: 4px;
    background: #e1e1e1;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.splitter:hover {
    background: #0078d4;
    opacity: 0.5;
}

.splitter:active {
    background: #0078d4;
    opacity: 0.8;
}

/* 드래그 한들 표시 */
.splitter::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 30px;
    background: #999;
    border-radius: 1px;
}

/* 패널 리사이저 스타일 */

/* 리사이저 기본 스타일 */
.panel-resizer {
    position: absolute;
    background: transparent;
    transition: background 0.2s;
}

/* 수평 리사이저 (좌우 패널용) */
.panel-resizer[data-panel="tree"],
.panel-resizer[data-panel="preview"] {
    width: 6px !important;
    cursor: col-resize !important;
    top: 0;
    bottom: 0;
    z-index: 1000;
}

/* 리사이징 중 표시 */
.panel-resizer.resizing {
    background: rgba(0, 120, 212, 0.5) !important;
}

/* 리사이저 호버 효과 */
.panel-resizer:hover {
    background: rgba(0, 120, 212, 0.3);
}

/* 패널 크기 조절 가능 표시 */
.folder-tree-panel,
.file-content-panel,
.preview-panel {
    position: relative;
    transition: width 0.1s ease-out;
}

/* 리사이징 중 선택 방지 */
body.resizing {
    user-select: none !important;
    cursor: col-resize !important;
}

body.resizing * {
    user-select: none !important;
}

/* 파일 탐색기 컨테이너 조정 */
.file-explorer-container {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* 폴더 트리 패널 */
.folder-tree-panel {
    width: 300px;
    min-width: 200px;
    max-width: 600px;
    flex-shrink: 0;
    flex-grow: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ddd;
    background: #f9f9f9;
    position: relative;
    overflow: hidden;
}

/* 파일 컨텐츠 패널 */
.file-content-panel {
    flex: 1;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 폴더 트리 컨테이너 */
.folder-tree {
    flex: 1;
    overflow-x: auto;
    overflow-y: auto;
    padding: 8px;
}

/* 트리 노드가 패널 너비를 초과할 때 */
.tree-node {
    white-space: nowrap;
    min-width: fit-content;
}

/* 트리 wrapper - 내용이 넘칠 때 스크롤 가능 */
.tree-wrapper {
    display: inline-block;
    min-width: 100%;
    width: max-content;
}

/* 스크롤바 스타일 */
.folder-tree::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.folder-tree::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.folder-tree::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.folder-tree::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 가로 스크롤바 표시 */
.folder-tree::-webkit-scrollbar-corner {
    background: #f1f1f1;
}

/* 리사이저 시각적 힌트 */
.panel-resizer::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 30px;
    background: #ccc;
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.2s;
}

.panel-resizer:hover::before {
    opacity: 0.5;
}

/* 리사이징 중 오버레이 */
.resize-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    cursor: col-resize;
    display: none;
}

body.resizing .resize-overlay {
    display: block;
}

/* 반응형 조정 */
@media (max-width: 1024px) {
    .folder-tree-panel {
        min-width: 150px;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .folder-tree-panel {
        width: 200px;
        min-width: 150px;
        max-width: 300px;
    }
}

/* 트리 노드 텍스트 줄바꿈 옵션 */
.tree-node-wrap-text .tree-node-content {
    white-space: normal !important;
}

.tree-node-wrap-text .tree-label {
    white-space: normal !important;
    word-break: break-word;
}

/* 툴팁 표시 (긴 텍스트용) */
.tree-label[title] {
    cursor: help;
}