Term: claustrophobia
Example: i had a sudden attack of claustrophobia when i locked myself in the closet
Definition: an intense, abnormal fear of small spaces