/* Основные стили таблицы */
.tree-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

/* Стили для родительских и дочерних строк */
.tree-table tr.parent,
.tree-table tr.child {
    transition: background-color 0.3s ease;
}

.tree-table tr.child td:first-child {
    border-left: 3px solid var(--subtask-border-color, #ddd);
}

.tree-table tr.child td.subject {
    padding-left: 20px;
}

/* Стили для сортировки */
.sort-header {
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

.sort-header:hover {
    background-color: #f5f5f5;
}

.sort-header .sort-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 5px;
}

.sort-asc .sort-icon:after {
    content: "▲";
    font-size: 0.8em;
    color: #666;
}

.sort-desc .sort-icon:after {
    content: "▼";
    font-size: 0.8em;
    color: #666;
}

/* Стили для дерева */
.expander {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    cursor: pointer;
    background: url(../images/arrow_expanded.png) no-repeat center center;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

.expander.collapsed {
    transform: rotate(-90deg);
}

.tree-connector {
    display: inline-block;
    margin-left: 20px;
    margin-right: 5px;
    color: #999;
    font-family: monospace;
}

/* Hover эффекты */
.tree-table tr:hover {
    filter: brightness(95%);
}

.tree-table tr.parent:hover {
    filter: brightness(97%);
}

/* Ячейки таблицы */
.tree-table td {
    padding: 8px;
    vertical-align: middle;
    border: 1px solid #e0e0e0;
}

.tree-table th {
    padding: 10px 8px;
    background-color: #f8f8f8;
    border: 1px solid #e0e0e0;
    font-weight: bold;
}

/* Select2 кастомизация */
.select2-container {
    min-width: 200px;
}

.select2-selection--multiple {
    border-color: #e0e0e0 !important;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tree-table tr {
    animation: fadeIn 0.3s ease;
}

/* Стили для мобильных устройств */
@media screen and (max-width: 768px) {
    .tree-table {
        display: block;
        overflow-x: auto;
    }

    .select2-container {
        width: 100% !important;
    }
}

/*Также можно добавить стили для лучшей видимости проблемных задач:*/


 .tree-table tr:hover {
     filter: brightness(95%);
 }

.tree-table tr.parent .expander {
    opacity: 0.8;
}

.tree-table tr.child .tree-connector {
    opacity: 0.8;
}