Mushroom Cards - Build a beautiful dashboard easily 🍄 (Part 2)

Thanks @LiQuid_cOOled it worked for one but not this one:

type: custom:mushroom-template-card
primary: Compressor
secondary: |-
  {% set d = {'off':'Off','on':'On'} %}
  {{ d.get(states(entity)) }}
icon: mdi:pump
tap_action:
  action: more-info
multiline_secondary: false
entity: binary_sensor.s1255_compressor_status
color: |-
  {% if is_state(entity, 'on') %}
    green
  {% else %}
   grey
  {% endif %}
features_position: bottom
card_mod:
  style:
    mushroom-shape-icon$: |
      .shape {
        --icon-symbol-size: 30px;
        --shape-color: none;
        background: ;
        border-radius: 50%;
        animation: {{ 'spin 2s linear infinite' if is_state(binary_sensor.s1255_compressor_status, 'on') else 'none' }} !important;
        stroke: white;
        stroke-width: .3px;
          }
      .shape:before {
        content: "";
        background:{{ 'lightgrey' if is_state(binary_sensor.s1255_compressor_status, 'on') else 'red' }};
        position: absolute;
        height: 24px;
        width: 24px;
        border-radius: 50%;
           }
       @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }

What am I missing?