I left for the gym this morning and went to take Cam outside to do her business before I left- well it was raining and she wouldn't consider going out so I just stuck her in the bathroom and put a potty pad in front of the door (where she usually goes if we leave her in there too long or if she's mad

) And when I came home she had pee'd on it!!
Okay, I'm like 99.999% sure it was an accident- she just happened to use it 'cause that's where she would have gone anyway...
Anywhoo I praised her and gave her a treat.
Did I do it "right"? And what do you think the chances are good that she might get the hang of this?
Also- what is the best way to discourage or "punish" her when she goes on the carpet or in the house- not on her pee pad?
Thanks for the help!