﻿.tree-view-container {
    font-family: Arial, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.controls input[type="text"] {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.controls button {
    padding: 8px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.controls button:hover {
    background-color: #e0e0e0;
}

.tree-view {
    max-height: 400px;
    overflow-y: auto;
}

.tree-item {
    margin: 5px 0;
    white-space: nowrap;
}

.tree-item .content {
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
    position: relative;
    padding-left: 25px; /* Consistent padding for all items */
}

.tree-item .content:hover {
    background-color: #f5f5f5;
}

.tree-item .children {
    padding-left: 20px;
    margin-left: 0;
    display: none;
}

.tree-item .triangle {
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    position: absolute;
    left: 0;
}

.tree-item .triangle::before {
    content: "\25B6";
    font-size: 12px;
}

.tree-item.expanded > .content .triangle::before {
    content: "\25BC";
}

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

.tree-item input[type="checkbox"] {
    margin-right: 5px;
    margin-left: 0;
}

.tree-item label {
    cursor: pointer;
}

.hidden {
    display: none;
}

/* Styles for the expanded item */
.tree-item.expanded > .content {
    background-color: #f0f0f0;
    font-weight: bold;
}

/* Style for selected item */
.tree-item input[type="checkbox"]:checked + label {
    color: #1a73e8;
}

/* Ensure consistent spacing for items with and without triangles */
.tree-item > .content > *:first-child {
    margin-left: 0;
}