Change colour and wording of 'Inventory status' block when sold out but continuing to sell

Hello, my question is about the ‘Inventory status’ block on product pages. I am using Dawn theme.

I have some products which when out of stock stock, I allow customers to continue to purchase. At the moment, the inventory block displays a green light and ‘In stock’ (if I state zero Low inventory threshold).

For these products which are out of stock but for which I allow continued purchase, I would like the block to change to an amber light, and for the text to read ‘Made to order’. For products which are out of stock and I don’t allow customers to continue purchasing, I would like a red light and for the text to read ‘Out of stock’.

The status should change when different variables are selected and the different variable has a different status.

Is this achievable and if so what theme code to I need to edit, or what custom liquid code can I use? Many thanks.

I’m also looking for solution to change the colour when ‘continue selling when out of stock’ items are out of stock (from green to yellow).

About the text, I think you can change it from the language settings, go to ‘Edit default theme content’

I just went through this so here’s what I did.

Go to blocks → product-inventory.liquid and find if inventory_policy == ‘continue’

Change it to look like this

      if inventory_policy == 'continue'
        assign status = 'low'
        assign translation_key = 'content.inventory_unavailable'
      else

Then go to locales → en.default.json . Go to “content“ and find

    "inventory_low_stock": "Low stock",
    "inventory_in_stock": "In stock",
    "inventory_out_of_stock": "Out of stock",

Then add this below it

    "inventory_unavailable": "Coming Soon", 

That will get you what you want.