<!-- ====================================================================================================================== -->
<!-- ## Copy dan paste kode dibawah ini di dalam tag <body> ##-->
<!-- Button Untuk Trigger Modal (Pilih Salah Satu Saja Antara Manual Atau Gambar) -->

<center>
    <!-- Kode dibawah ini jika ingin menggunakan button manual -->
    <button type="button" class="btn buttons-ambil-promo floating-btn" data-bs-toggle="modal"
        data-bs-target="#exampleModal"><span><i class="fa fa-shopping-cart" aria-hidden="true"></i>
            AMBIL PROMO SEKARANG
    </button>

    <!-- Kode dibawah ini jika ingin menggunakan button dengan gambar -->
    <button class="floating-btn" data-bs-toggle="modal" data-bs-target="#exampleModal">
        <img src="src/assets/whatsapp2.gif" alt="Floating Button" /> <!-- Sesuaikan dengan gambar/gif yang akan dipakai -->
    </button>
</center>

<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h1 class="modal-title fs-5" id="exampleModalLabel">Modal title</h1>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <div style="
        border-radius: 10px;
        margin: 7% 4%;
        padding: 5px 25px;
        background: #ffe610;
        border: 4px solid red;
      ">
                    <div class="form-container-custom">
                        <p style="font-size: medium; font-weight: 600;">Formulir <br />Pengambilan Promo</p>
                    </div>

                    <form id="form-order" class="loops-forms" action="<?php echo $_LOOP_EMAIL; ?>" method="POST">
                        <div class="loops-group">
                            <label for="name" style="color: #000">Nama Lengkap<span class="red">*</span></label>
                            <input type="text" id="name" name="name" value="" placeholder="Tulis nama Anda"
                                required />
                        </div>
                        <div class="loops-group">
                            <label for="phone" style="color: #000">NO WhatsApp <span class="red">*</span></label>
                            <input type="text" id="phone" name="phone" value=""
                                placeholder="Sebutkan nomor HP aktif Anda: contoh 081234567890"
                                pattern="[0]{1}[0-9]{8,12}" required />
                        </div>
                        <div class="loops-group">
                            <input type="submit" value="Beli + Ambil Promo" class="loops-submit btn-add-to-cart" />
                        </div>
                        <input type="hidden" id="current" name="current" value="" />
                        <input type="hidden" name="redirect" value="" />
                        <input type="hidden" name="_loops_nonce" value="" />

                        <!--CAPI EVENT-->
                        <input type="hidden" name="event_id" id="event_id" value="eATC-<?php echo $_EVENT_ID; ?>" />

                        <div style="text-align: center">
                            <p style="
              background: #ffa432;
              color: #000;
              font-weight: 900;
              font-size: 18px;
              padding: 2px;
            ">
                                PASTIKAN NOMOR WA KAMU BENAR, AGAR KAMI BISA MENGHUBUNGI KAMU
                            </p>
                        </div>
                    </form>
                    <script>
                        var form = document.getElementById("form-order");
                        form.addEventListener("submit", function (e) {
                            setCookie("vip", "<?php echo $_V_IP; ?>", 7);
                            fbq(
                                "track",
                                "AddToCart",
                                { currency: "IDR" },
                                { eventID: "eATC-<?php echo $_EVENT_ID; ?>" }
                            );
                        });
                    </script>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- ====================================================================================================================== -->