Trying to display motion sensor change in floor plan

Following my SATEL ALARM integration in HA, i am now trying to show indication of motion sensor state in a floor plan like this:

 - type: state-icon
    entity: sensor.integra_pir_grafio
    icon: mdi:run
      top: 40%
      left: 74%
      value_template: '{{ ''VIOLATED'' in states(''sensor.integra_pir_grafio'') | default([]) }}'
      '--iron-icon-stroke-color': '#8c1414'
      border-radius: 50%
      text-align: center
      background-color: rgba(255, 255, 255, 0.3)

So the icon should change color when sensor (zone) state turns to ‘violated’ but… its doesn’t work.
What am I doing wrong?

Neither of these are valid style CSS elements.

See here for your answer:

Thanks for the input tom_I.
Unfortunately my CSS skills are rather limited. Couldn’t figure out the correct syntax from these examples.
Would you mind giving an example in this context?
Thanks again!

You can also create an image for the “off” and “on” states and use the state_image to display different images depending on the state. If you use a PNG with a transparent background it will overlay nicely.