/* Sortable list styles */
.sortable-list {
    border: 0px solid transparent;
    background: transparent;
    overflow: visible;
    min-height: 0px;
}

.sortable-item {
    cursor: grab;
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sortable-item .sortable-list {
    padding-top: 5px;
    padding-bottom: 5px;
}

.sortable-list .sortable-item:last-child {
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sortable-list .sortable-item .sortable-list {
    margin-left: 40px;
    position: relative;
}

.sortable-list .sortable-item .sortable-list:has(.sortable-list) {
    padding-bottom:0px;
}

.sortable-list .sortable-item .sortable-list .sortable-item:first-child {
    margin-top:5px;
}

.sortable-item .ticketBox {
    margin-bottom:0px;
}

/* Connection lines for hierarchy */
.sortable-list .sortable-list::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0px;
    bottom: 0;
    width: 2px;
    background-color: var(--interactive-icon-color);
    height: calc(100% - 45px);
}

.sortable-item:has(.accordion-toggle .fa-angle-right) {
    margin-bottom:10px;
}

.sortable-list .sortable-list .sortable-list::before {
    height: calc(100% - 50px);
}

/* Horizontal connector line from vertical line to each item */
.sortable-list .sortable-list > .sortable-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 30px;
    width: 10px;
    height: 2px;
    background-color: var(--interactive-icon-color);
}

/* Rounded corner for the connection */
.sortable-list .sortable-list > .sortable-item::after {
    content: '';
    position: absolute;
    left: -20px;
    top: 32px;
    width: 10px;
    height: 10px;
    border-bottom-left-radius: 10px;
    border: 0 solid transparent;
    border-bottom: 2px solid var(--interactive-icon-color);
    border-left: 2px solid var(--interactive-icon-color);
    background-color: transparent;
    transform: translate(0, -10px);
}


/* Highlight styles for drop targets */
.highlight-drop {
    position: relative;
    &::after {
        content: '';
        position: absolute;
        top: 5px;
        left: 0;
        right: 0;
        bottom: 0;
        background: hsla(var(--accent2-hsl), 0.1);
        border: 2px dashed hsla(var(--accent2-hsl), 0.3);
        pointer-events: none;
        border-radius: 4px;
    }
    min-height: 62px !important;
}

.highlight-drop-error {
    position: relative;
    &::after {
        content: '';
        position: absolute;
        top: 5px;
        left: 0;
        right: 0;
        bottom: 0;
        background: hsla(0, 100%, 50%, 0.1);
        border: 2px dashed hsla(0, 100%, 50%, 0.3);
        pointer-events: none;
        border-radius: 4px;
    }
    min-height: 62px !important;
}

.sortable-ghost {
    opacity: 0.7;
    box-shadow: 0 0 8px hsla(var(--accent2-hsl), 0.3);
}

.sortable-ghost .sortable-list:empty {
    background: transparent;
    min-height: 0px;
}



.sortable-item.sortable-chosen {
    cursor: grabbing;
}

.ui-sortable-helper {
    z-index: 99999 !important;
}

/* Placeholder styling */
.sortable-placeholder {
    background: rgba(0, 0, 0, 0.05);
    border: 1px dashed rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    margin-bottom: 5px;
    height: 60px;
    position: relative;
}



/* Task collapse toggle styles */

.task-collapse-toggle {
    position: absolute;
    left: -25px;
    top: 20px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
    text-align: center;
    border-radius: 50%;
    background: var(--secondary-background);
}

.milestone-box .task-collapse-toggle {
    top:25px;
}

.sortable-list .sortable-list .task-collapse-toggle {
    left: -32px;
    top: 18px;

}

.task-collapse-toggle:hover {
    background-color: var(--neutral);
}

.task-collapse-toggle i {
}

.ticketBox.has-children {
    position: relative;
}

/* Collapsed children styles */
.task-children.closed {
    display: none;
}

.task-children.open {
    display: block;
}

.task-collapse-toggle i.fa-chevron-right {
    color: var(--neutral);
}

/* Quick Add Form Styles */
.add-task-button {
    display: inline-block;
    margin-left: 10px;
    color: var(--primary-font-color);
}

.add-task-button:hover {
    opacity: 1;
    color: var(--accent1);
}

.quickAddForm {
    background: var(--secondary-background);
    border-radius: var(--box-radius);
    padding: 15px;
    margin-top: 10px;
    box-shadow: var(--regular-shadow);
}

.main-title-input {
    width: 100%;
    padding: 8px;
    border-radius: var(--element-radius);
    border: 1px solid var(--main-border-color);
    margin-bottom: 10px;
}

/* Milestone box styling for My Work dashboard */
.milestone-box {
    background-color: var(--secondary-background);
    border-left: 0px;
    border-right:0px;
    border-radius: var(--box-radius);
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: var(--regular-shadow);
}

.milestone-box .tw-flex {
    /*color: var(--main-titles-color);*/
}

.milestone-box .progress-wrapper .percent-label {
    font-size:14px;
    /*color: var(--main-titles-color);*/
}

.milestone-box h4 {
    font-weight: bold;
    color: var(--primary-font-color);
    margin-top: 0;
}
