I'm going against the grain. Never mind about consequences for her outburst. If the outburst was caused by you saying no to something, obviously don't change your original answer, but don't give separate consequences for her shouting/rudeness when she's cross. Taking away a future treat/privilege because she can't manage her emotions is too far removed in time and logical sense.
What she needs is help to understand and manage her emotions. This is a skill she hasn't got yet. You need to help her learn, not punish her for her current lack. This isn't something to do when she's angry, it's something to talk about all the rest of the time. You have to model emotional intelligence. You have to point out when people on TV, in books, in real life (like her friends) handle things well, or when they react poorly and then think together about what they could have done instead. You need to give her the words to be able to talk about how she feels. And make it normal and safe in your family to be able to say "I'm angry with you because..." without all hell breaking loose. She is allowed to be angry. You are allowed to continue to hold your line in the sand while acknowledging her anger. Together, you need to find strategies that help her, like going outside, splashing cold water on her face, breathing, listening to loud music, jumping etc
I get so cross back at her, but it makes things worse.
Matching her anger will make it worse. You get into a cycle of you feeding her anger and her feeding yours. One of you needs to remain calm, and you're the adult, so you need to work on your own emotional control and emotional intelligence first.
In the moment of her being angry. You need to not react out of your own anger. You need to maintain control. Did you have a strict school teacher when you were a kid? Channel that engery. Stern voice, clipped tone, short sentences. Tell her what to do, not what not to do. "Stop." "Take a breath before you say anything else." "Go outside and shout if you need to" etc. When she's calm talk to her about her feelings. It's ok to be angry, it's not ok to shout at people. Etc.
I would have never dreamed of speaking to my parents or answering back the way she does
Feel like i’m failing as a parent
This is why you are getting angry yourself and why you can't remain in control when she's angry. Her outbursts are pushing your "I'm a shit mum" button. You're not failing. You are parenting in a different generation to your parents. You can't reproduce what they did and get the same results even if you wanted to. There are different social expectations for how kids are treated now. We've all as a society gone to far to the "don't upset the little dears/let's be their friend" end of the parenting spectrum. Your kid has that as the backdrop to their behaviour. The way we were parented was equally bad. Societal norms 40 years ago were more on the emotional neglect and control of behaviour though fear end of the spectrum. You need to find something in the middle.