I'm working on a sheet for an upcoming game (Unity). Part of the project is letting the players add their powers (think 4e-style abilities) to a repeating list. These powers have "mana" costs associated with them (every class resource is called something different, but let's call it mana for simplicity's sake). Each power has a checkbox (which I plan on styling like a button) which deducts the cost from the player's mana pool. I also have functions watching to make sure the values don't go below 0 or above the max. My issue is that I want to disable the "spend power" checkbox when the player doesn't have the mana to spend. For instance, I have the made-up power Justice set up on my sheet. It has a cost of 3, and the player only has 2 mana. In this situation, I want the spend mana button to be greyed out/disabled/whatever. I can't figure out how to make this work - a lot of the CSS hide/show/disable tricks require the player to actively click on a checkbox, but I want this to happen automatically (I have a loop that checks all of the powers any time the player's mana value changes, to re-evaluate what is affordable and what isn't). Any help would be greatly appreciated!