‘The state of Texas lost this case,’ judge in foster care lawsuit says