Scraping text under style condition

Hi again,

I am trying to scrape from here a price:

I have this selector:
"id":"price_1m","parentSelectors":["open"],"type":"SelectorText","selector":".sidebar-cost span[data-behavior='price-amount']","multiple":false,"regex":""}

pulling from this code line
span data-behavior="price-amount" style="display: none;" class="">€5,940 /span

However, I only want to scrape the price if style IS NOT "display: none;" and I can't figure it out how to add this condition. Can you help? Thanks a lot!

Assuming the HTML is:

<div class="price">
  <div class="from js-sidebar-cost-popup-from" data-behavior="from-price_from"> From </div>
  <span data-behavior="price-amount"> €5,400 </span>
  <span class="period sidebar-cost-duration" data-behavior="price-stay-unit"> per month </span>
</div>

It is probably easiest to match the intended span exactly, e.g.

div.price > span[data-behavior='price-amount']

But if you want that specific condition, it can be done with something like:

div.price:not(:has(span[data-behavior*='display: none'])) > span[data-behavior]