/*
 * Nestable CSS
 * Customized for a modern card-based UI
 */

.dd {
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
    width: 100%; /* Use full width */
    list-style: none;
}

.dd-list {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Key for hierarchy indentation */
.dd-list .dd-list {
    padding-left: 40px; /* Increased indentation */
}

.dd-collapsed .dd-list {
    display: none;
}

.dd-item {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
    margin-bottom: 10px; /* Add space between items */
    border: 1px solid #e5e7eb; /* Add border to the item itself */
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.dd-empty,
.dd-placeholder {
    display: block;
    position: relative;
    margin: 0;
    padding: 0;
}

/* Handle styles */
.dd-handle {
    display: block;
    height: auto;
    margin: 0; /* Remove margin as it's on dd-item now */
    padding: 0; /* No padding, handled in HTML */
    border: none; /* No border */
    background: transparent; /* No background */
    cursor: move;
    -webkit-appearance: none;
    appearance: none;
}

.dd-handle:hover {
    /* Hover is handled by Tailwind on the element itself */
    background: transparent;
}

/* Hide the default expand/collapse buttons */
.dd-item > button {
    display: none;
}

/* Placeholder style */
.dd-placeholder {
    margin: 10px 0;
    padding: 0;
    min-height: 60px;
    background: #f0f5ff; /* A light blue */
    border: 2px dashed #60a5fa; /* A dashed blue border */
    box-sizing: border-box;
    border-radius: 8px;
}

.dd-empty {
    border: 1px dashed #bbb;
    min-height: 100px;
    background-color: #f5f5f5;
}

/* Dragged element style */
.dd-dragel {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.9;
    /* width: 100%; <-- THIS WAS THE PROBLEM, REMOVING IT */
}

.dd-dragel > .dd-item .dd-handle {
    margin-top: 0;
}

.dd-dragel .dd-item {
    -webkit-box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.dd-no-drag .dd-handle {
    cursor: default;
}
