1997 Mazda MX-5 Miata heat and AC quit after working

Heat and AC quit after working.
I was running the AC and noticed it quit working after a few minutes. I turned it off then tried again 2 or 3 minutes later and it worked for a few more, then went to blowing outside air temp again. The same thing happened with the heat a day later. Heated air, then stopped heating air.
Turned off for a few, then started working again.
Miata runs great otherwise.

Suspect faulty blend door. Do you hear a clicking sound when switching modes?