.sortable {
    min-height: 5px;
    padding: 2px;
}

.sortable-active {
    outline: 2px dashed #007bff;
    background: rgba(0, 123, 255, 0.02);
    min-height: 40px;
    padding: 20px 10px;
    transition: all 0.2s ease;
}

.sortable[data-parent-id="root"].sortable-active {
    padding-bottom: 100px;
    background: rgba(0, 123, 255, 0.05);
}

/* Create gaps between elements during drag to make "same level" drop zones easier to hit */
.sortable-active > .plot-element-container {
    margin-top: 25px;
    margin-bottom: 25px;
}

/* Visual indicator for the same-level drop zone */
.sortable-active > .plot-element-container::before {
    content: "";
    position: absolute;
    top: -22px;
    left: 0;
    right: 0;
    height: 20px;
    border: 2px dashed rgba(0, 123, 255, 0.4);
    border-radius: 4px;
    background: rgba(0, 123, 255, 0.05);
    pointer-events: auto;
    display: none;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
    transition: all 0.2s ease;
}

.sortable-active > .plot-element-container::before:hover {
    height: 35px;
    top: -30px;
    background: rgba(0, 123, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.1);
}

.sortable-active > .plot-element-container:first-child::before {
    display: flex;
}

.sortable-active > .plot-element-container::after {
    content: "";
    position: absolute;
    bottom: -22px;
    left: 0;
    right: 0;
    height: 20px;
    border: 2px dashed rgba(0, 123, 255, 0.4);
    border-radius: 4px;
    background: rgba(0, 123, 255, 0.05);
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #007bff;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 5;
    transition: all 0.2s ease;
}

.sortable-active > .plot-element-container::after:hover {
    height: 35px;
    bottom: -30px;
    background: rgba(0, 123, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.8);
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.1);
}

.plot-element-container {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
}

/* Root level should not be indented */
.sortable[data-parent-id="root"] > .plot-element-container {
    margin-left: 0;
}

.sortable-placeholder {
    border: 2px dashed #007bff !important;
    background: rgba(0, 123, 255, 0.1) !important;
    margin: 10px 0 !important;
    min-height: 50px !important;
    visibility: visible !important;
    position: relative;
}

/* Label for placeholders in root */
.sortable[data-parent-id="root"] > .sortable-placeholder::before {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 10;
}

/* Label for placeholders in nested containers */
.sortable:not([data-parent-id="root"]) > .sortable-placeholder::before {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #007bff;
    font-weight: bold;
    font-size: 0.85rem;
    z-index: 10;
}

/* Visual cue for empty child containers during drag */
.sortable:not([data-parent-id="root"]).sortable-active:empty {
    min-height: 50px;
    padding: 10px;
}

.sortable:not([data-parent-id="root"]).sortable-active:empty::after {
    display: block;
    text-align: center;
    color: #007bff;
    font-size: 0.8rem;
    font-style: italic;
    padding: 5px;
    opacity: 0.7;
}

.plot-bar {
    background-color: #212529;
    color: #fff;
    border: 1px solid #373b3e;
    border-radius: 4px;
    padding: 8px 12px;
}

.plot-bar .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}
