/* This CSS file will be loaded at last. Any CSS customization should be placed here */

<script>
document.addEventListener("DOMContentLoaded", function () {
    const cancelBtn = document.querySelector(".vbo-btn-cancelbooking");

    if (cancelBtn) {
        cancelBtn.addEventListener("click", function (e) {
            e.preventDefault();

            if (confirm("Your reservation will be cancelled and refund will be processed as per our policy. Please read our cancellation policy for more info.")) {

                const form = cancelBtn.closest("form");
                if (form) form.submit();

                setTimeout(() => {
                    window.location.href = "/";
                }, 300);
            }
        });
    }
});
</script>
