I found the leak. It's that cheap POS cpvc elbow. I will keep dismantling the closet until I am high enough to replace it. As for the ceiling I am going to try and dry it out and refloat it.
I'm not too concerned with mold as this house is not very tight. I'm going to put a fan blowing conditioned air into the cavity in the closet and see how that works.
I'm am relieved that it is not the pan that would have killed me.