Spur of the moment.

This idiom or expression means:

Without pre-planning.
Without thinking about it thoroughly.

A. Your trip to Michigan was a surprise to me.
B. Well, it was a surprise to me, too!! I did it on the spur of the moment.