I think a 25x's writing assignment could be in order.
"I, (her name), realize that I am but 12 years old and I must obey my parents at all times. When I give them my opinion (without being asked) or if I give them any kind of attitude while getting in trouble, I understand that, as parents, they have the responsibility of correcting me so that I don't grow up to be a hoodlem. If they have to correct me, I understand that I may loose the privilege of (make a list of them) and it will be at their disgression as to when I will will get that privilege back. The more I rebel against their authority, the worse it will be for me. I will, therefore, stop acting like a brat and start being obedient. Mom and Dad, I am sorry for my behavior. You are right."
If it is any consolation, almost all of my friends who have 12 year olds are having this same kind of problem. Mine are 11 and 12 and haven't started it yet, though I expect it at any time. Hang in there!