Please take a minute and review the ACLU's citizen's rights review at this link. Click through the pages of the ACLU review.
One suggestion that the ACLU did not make is turn on your telephone voice audio recorder and leave the phone in your pocket - maybe a recording could be helpful later.
Good luck.
Know when to assert constitutional rights for others & yourself
here is more good advice from the ACLU at this link https://www.aclu.org/blog/immigrants-rights/ice-and-border-patrol-abuses/one-woman-who-knew-her-rights-forced-border