Hmmm…I’m pretty sure that this is not going to be a CSS solution. I cannot think of any selector that would do what you are after.
It might be possible with a whole bunch of selectors and/or
:notstatements but it would be quite difficult to think of every possible combination.
This would have to be JS/JQ solution I feel.