/* AhaPay Modal Settings for WooCommerce Products */
document.getElementById("openModalBtn").onclick = function () {
    document.getElementById("ahapayModal").style.display = "block";
};

document.querySelector(".ahapay-close").onclick = function () {
    document.getElementById("ahapayModal").style.display = "none";
};

document.querySelector(".ahapay-modal-cta").onclick = function () {
    document.getElementById("ahapayModal").style.display = "none";
};

window.onclick = function (event) {
    const modal = document.getElementById("ahapayModal");
    if (event.target == modal) {
        modal.style.display = "none";
    }
};