This is not an idiom per se, nor is it confined to American English alone. It is a perfectly normal construction used by native speakers worldwide, one that follows naturally once you realize that just anybody is a kind of negative.
Attributive adjectives can only ever follow indefinite pronouns, never precede them as with nouns.
The OP is mistaking the part of speech of the modifier just here in their sentence:
- Nina wouldn’t give her phone number to just anyone.
Modifiers that precede indefinite pronouns are
always adverbs, never adjectives. For example:
- Absolutely nobody is allowed behind the curtain.
That’s because pronouns are not quite like nouns when it comes to
adjectives: attributive adjectives that modify an indefinite pronoun can
only ever be placed after the pronoun they modify, never before it.
These
are grammatical:
- We need somebody brave to save us.
- Somebody brave just volunteered.
But these are not grammatical:
- We need ❌brave somebody to save us.
- ❌Brave somebody just volunteered.
This unusual requirement that the attributive adjective must follow the
indefinite pronoun is because these are the remnants of copular clauses
that have been whittled down via the process known as whiz-deletion:
- We need somebody [who is] brave to save us.
- Somebody [who is] brave just volunteered.
The adjective just refers to the quality of justice:
- Any just person would free the falsely condemned prisoner.
- Any person who was just would free the prisoner.
- Anybody who was just would free the prisoner.
- Anybody just would free the prisoner.
But that is not at all what is going on here. It does not mean anybody
just; it means anybody whatsoever or anybody at all, which like most modern uses of any is a kind of negative. Those are therefore adverbial
uses.
So this is not an instance of a misplaced adjective just but rather
the focusing adverb just in one possible location in the sentence. The
poster’s sentence is exactly equivalent to one with the focusing adverb
just moved elsewhere in the sentence:
- Nina wouldn’t just give her phone number to anyone.
With the implication that she wouldn’t just hand out her personal, private
phone number to absolutely any random stranger who asked her for it.
Compare that with the same type of movement you see happening with the
focusing adverb only in such sentences as:
- She didn’t only give it to John.
- She didn’t give it only to John.
- She didn’t give it to only John.
- She didn’t give it to John only.
Negative polarity items
You might notice, by the way, that absolutely is only used like this in negatives. This is also the case with just. The negation of the main verb in wouldn’t give is what licenses and indeed requires that it be just anyone not just someone.
- Absolutely anybody at all will do.
- Just anybody at all will do.
- Absolutely ❌somebody at all will do.
- Just ❌somebody at all will do.