.sortable-placeholder {
    background: #e9ecef;
    border: 2px dashed #6c757d;
    border-radius: 5px;
    height: 80px;
    margin: 10px 0;
    position: relative;
}

.sortable-placeholder::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    background: rgba(233, 236, 239, 0.9);
    padding: 5px 10px;
    border-radius: 3px;
}

.child-placeholder {
    background: #e9ecef;
    border: 2px dashed #6c757d;
    border-radius: 5px;
    height: 40px;
    margin: 2px 0;
    position: relative;
}

.child-placeholder::before {
    content: "↓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 16px;
    font-weight: bold;
}

.groups-container.ui-sortable-helper-active {
    background: rgba(0, 123, 255, 0.05);
    border: 2px dashed #007bff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.group-wrapper.ui-sortable-placeholder-active {
    border: 2px solid #28a745 !important;
    background: rgba(40, 167, 69, 0.1) !important;
    box-shadow: 0 0 15px rgba(40, 167, 69, 0.3);
}

.ui-sortable-helper {
    border: 2px solid #007bff !important;
    border-radius: 5px;
    background: #f8f9fa !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10000 !important;
}

.ui-sortable-helper .parent-row {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
    color: white !important;
}

.ui-sortable-helper .parent-row td {
    color: white !important;
}

.ui-sortable-helper .drag-handle {
    color: white !important;
}

.child-helper {
    border: 2px solid #28a745 !important;
    background: #ffffff !important;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.child-helper .child-drag-handle {
    color: #28a745 !important;
}

@keyframes placeholderPulse {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}

.sortable-placeholder,
.child-placeholder {
    animation: placeholderPulse 1.5s infinite;
}

.groups-container.ui-sortable-over {
    border: 3px dashed #007bff;
    background: rgba(0, 123, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
}

.insertion-line {
    height: 3px;
    background: #007bff;
    margin: 5px 0;
    position: relative;
}

.insertion-line::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 0;
    width: 100%;
    height: 11px;
    background: rgba(0, 123, 255, 0.1);
}

.group-wrapper.drop-target {
    border: 2px dashed #17a2b8 !important;
    background: rgba(23, 162, 184, 0.1) !important;
    position: relative;
}

.group-wrapper.drop-target::after {
    content: "Отпустите чтобы добавить сюда";
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #17a2b8;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.group-wrapper.drop-target::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #17a2b8;
}

.can-drop {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05) !important;
}

.cannot-drop {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.05) !important;
    opacity: 0.6;
}

.temporary-drop-zone {
    border: 3px dashed #6f42c1;
    background: rgba(111, 66, 193, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
    color: #6f42c1;
    font-weight: bold;
}

@keyframes successfulDrop {
    0% {
        background-color: rgba(40, 167, 69, 0.3);
    }
    50% {
        background-color: rgba(40, 167, 69, 0.6);
    }
    100% {
        background-color: transparent;
    }
}

.successful-drop {
    animation: successfulDrop 1s ease-in-out;
}

.depth-indicator {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Стили для превью того, как будет выглядеть структура после сброса */
.preview-structure {
    border: 2px solid #28a745;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
    opacity: 0.8;
}

.work-knowlege-hierarchical {
    background: white;
    padding: 8px 0;
}

.work-knowlege-hierarchical .checkbox {
    margin: 0;
    padding: 4px 16px;
}

.work-knowlege-hierarchical .checkbox:has(.child-element) {
    padding-left: 32px;
}

.work-knowlege-hierarchical .checkbox:has(.child-element) label {
    font-size: 13px;
    color: #666;
}

.work-knowlege-hierarchical input[type="checkbox"].indeterminate-state + label::before {
    background-color: #007bff;
    border-color: #007bff;
    content: "—";
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}
