<div id="cookie-consent-block" class="container position-fixed bottom-0 left-0 block">
    <div class="rounded-0 mb-0 alert alert-primary alert-dismissible fade show" role="alert">
        {{ guest.cookieconsent_message }}
        <button id="close-cookie-consent-btn" type="button" class="btn-close" data-bs-dismiss="alert" aria-label="{{ 'Close'|trans }}"></button>
    </div>
</div>
<script>
    if (localStorage.getItem('cookie-consent') === '1') {
        document.getElementById('cookie-consent-block').style.display = 'none';
    }
    document.querySelector('#close-cookie-consent-btn').addEventListener('click', () => {
        localStorage.setItem('cookie-consent', '1');
        document.querySelector('#cookie-consent-block').style.display = 'none';
    });
</script>
