Yes from Mendix 8.14 there is a new feature Dynamic Classes.
Please see details here
Yes, you can do this by using XPATH’s declarations based on context.
Go to widgets right section on Mendix, then chose the “Galery”
On gallery props, look for the field “Dinamic Items Class”, and put your XPATH expression something like bellow
if $currentObject/Status = PainelCentral.StatusValues.Busy then ‘yourcsssclass'
else if $currentObject/Status = PainelCentral.StatusValues.Free then 'yourcssclass'
Then look for your _layout-atlas.scss file or other css file linked to your page and write your css classes there like this and test: