Picture Elements: Icon based upon state? Is it possible?

The vision is to show an icon where a camera is positioned which will a) change icons when motion is detected (i.e. state is ‘on’) and b) change colors when the camera is recording.

I can’t figure out how to do either.

## This inside of a picture-elements card.

- type: state-icon
    entity: binary_sensor.amcrest_patio_motion_detected
    icon: mdi:run
    title: 'Whatever Title'
    style:
      top: 47.8%
      left: 57.5%
      '--iron-icon-stroke-color': '#969696'
      '--paper-item-icon-active-color': '#ff0000'
      transform: scaleX(-1)
      border-radius: 50%
      background-color: rgba(255,255,255, 0.3)

Color : may be achieved by config-template-card or card-mod.
Icon: may be achieved by config-template-card or (untested) card-mod.

Go to corresponding dedicated threads for details.