/* ❤️ */
/* Styles > Style Variables Drag to Rearrange */
/* Make style variable rows draggable with visual feedback */

.token-wrapper:not(.draggable) {
    justify-content: flex-start !important;
    margin-left: 24px;

    .color-token-picker {
        order: 1;
    }

    .token-caption {
        padding-left: 16px;
        order: 2;
    }
}

.token-wrapper.draggable {
    justify-content: flex-start !important;
    cursor: default;

    .token-drag-handle {
        order: 0;
    }

    .token-composer-and-delete {
        order: 1;
        margin-right: 16px;
    }

    .token-name-and-edit {
        order: 2;
    }
}

.token-wrapper.dragging {
    opacity: 0.5;
}

.token-wrapper.drag-over {
    border-top: 3px solid #2196f3;
}

.token-wrapper.drag-over-bottom {
    border-bottom: 3px solid #2196f3;
}

/* Save order button */
#styles-save-order-btn {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    padding: 12px 24px;
    background-color: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    display: none;
}

#styles-save-order-btn:hover:not(:disabled) {
    background-color: #1976d2;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

#styles-save-order-btn.show {
    display: block;
}

#styles-save-order-btn.saving {
    background-color: #9e9e9e;
    cursor: wait;
}

#styles-save-order-btn.success {
    background-color: #4caf50;
}

#styles-save-order-btn.error {
    background-color: #f44336;
}

#styles-save-order-btn:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

.token-drag-handle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    width: 16px;
    margin-right: 8px;
    padding: 0 4px;
    cursor: grab;
    user-select: none;
}

.token-drag-handle span {
    width: 100%;
    height: 2px;
    background-color: #9e9e9e;
    border-radius: 1px;
}

.token-wrapper.dragging .token-drag-handle {
    cursor: grabbing;
}
