Being put into a prison without a bed and separating a mother from her child for a wrong turn seems like it's criminal, not civil. Civil would be being asked to show up to court, not being imprisoned.
Yes it does seem criminal...but its not. Thats my point Immigrants in detention centers/immigration proceedings are treated like criminals, but they aren't (certainly a immigrant could be a criminal, but thats separate from anything to do with Immigration detention and Immigration Courts).