Show state from entity and lock

Hello! I currently have a custom button-card set for my front door. It shows hass:door green if it’s “off” (aka closed) and hass:door red, animation blink 2s. I also have a lock on that door showing if it’s locked or unlocked.

I’m wondering if it’s possible to combine the two, binary_sensor.back_door and lock.back_door_lock for the display. I’d like to keep how the door displays now… locked and shut (hass:door, green), unlocked and open (hass:door red + animation) but when it’s unlocked and shut, display it in yellow with an unlock symbol. I don’t care if it’s unlocked and open.

Additionally, I’d like to be able to tap it once to see the history of it being open and shut, and long press it to lock/unlock.

Is this possible and if so…can someone help me with the code? Thank you very much for reading this! Here is my current code:

type: custom:button-card
entity: binary_sensor.back_door
name: Back
show_icon: true
icon: hass:door
state:
  - value: 'off'
    color: green
    icon: hass:door
  - value: 'on'
    icon: hass:door
    styles:
      card:
        - animation: blink 2s ease infinite
    color: red

Does anyone have an idea for this or is this just not possible?

Thank you!