I took too long in the shower.

(Is this grammatical? What is the part of speech of 'long'? Is 'long' a noun?)