How to fix persistent age check pop-up after pressing enter?

I’ve added a age check to our store, and its working great. But unfortunately we are unable customize our theme anymore as the pop up message still showing even if we pressed ENTER. Seeking to your solution and support.

we used the below snippets, and then we’ve added “{% render ‘age-check’ %}” at the end after

{% assign enter_date_of_birth = false %}

{% assign age = 18 %}

{% capture adult_header %}
Adults only (18+)
{% endcapture %}

{% capture adult_text %}
This website contains adult material and is only suitable for those 18 years or older. Click Enter only if you are at least 18 years of age.
{% endcapture %}

{{ adult_header }}

{{ adult_text }}

Enter or Exit
.modal-prompt { background: #fff; border-radius: 2px; box-shadow: 0px 0px 10px rgba(0,0,0,0.5); width: 330px; height: auto; margin: 0 auto; padding: 20px 35px 30px 35px; position: relative; top: 25%; z-index: 1000000; } .modal-prompt p, .modal-prompt h1 { color: #555555; } #prompt-background { background: url("{{ 'age-check-background.jpg' | asset_url }}") no-repeat center center fixed #555; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; width: 100%; height: 100%; position: fixed; left: 0; top: 0; z-index: 9999999; } .modal-prompt select { float: left; margin-right: 10px; }

Still waiting if anyone can help to solve this issue ASAP