Basically with Click, you are doing every macro at once.
But it executes top down, so the first click will have priority over the second click, if both share the GCD.

An ability like Elemental Mastery, which is not on the GCD, is activated on the first click, because regardless of which button its on, it does not interfere with other spells.
It is not consumed by Flame Shock because that is already an instant cast.
So the first non-instant cast on any of the buttons gets Elemental Mastery.

If the primary purpose of this macro is for pvp, I'd have two macro's.

The first would be your spam dps macro, which wouldn't include Elemental Mastery.
Basically, go with Flame Shock, Lava Burst, Chain Lightning, Lightning Bolt, as your dps spells.
You can weave Wind Shear in, probably staggered for each shammy so you're not casting all of them at once.
You might place Frost Shock into this macro, for the snare/inconvenience on others.

The I-Win macro would be easiest to execute as a castsequence and not a click spam.
Go with:
#show Elemental Mastery
/castsequence [target=focus] Elemental Mastery, Flame Shock, Lava Burst, Chain Lightning, Frost Shock.
It will show Elemental Mastery, so you know when its off of cooldown; the target is focus, so you just need to target someone and have every shammy lightning bolt or purge them, thereby acquiring them as a target. Then do the same to someone else. One of the targets is marked as everyone's focus, and gets to be obliterated when the time is right.