Just a reminder to fellow Americans even, that this crap has been going on way too long before this point. There's a rather huge area around our borders dubbed "Constitution-free zones".
Yeah, the "sworn to uphold" types are funny-quiet when it comes to "We can do whatever we want, cry about it." Within 100 miles of ANY land or coastal border.
Americans and visitors (God be with you both), might be wise to get a cheap "travel only" phone with only the bare-necessary logins and information on it, as they move about. Don't bother with your laptop if you can help it.
Don't anticipate basic encryption to do anything against this either. (Although , YES, DO ENCRYPT!)
People have been detained and coerced into unlocking their phones so agents could basically just dump the device to a drive and look through whatever they want.
(No, simply deleted files are not unreadable unless securely wiped, and evidence of wiping your phone beforehand would probably lead to more questioning.)
Within 100 miles of the border of the "land of the free", you have no say in this, and if you try to muster up the courage to resist in the "home of the brave", you'll just face further punishment.
It's unlikely you will get stopped for this purpose unless you have a certain profile-of-the-week or whatever they're looking for, but it's best to keep this in mind.