{{-- RIWAYAT BUKET --}}
<div class="modal fade text-left" id="riwayatBuket" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
        <div class="modal-content">

            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel1">Detail Riwayat Pesanan Buket</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>

            <div class="modal-body">
                <div class="row gx-3">

                    <div class="col-12 col-md-6">

                        <h6 class="modal-section-title">Rincian Pesanan</h6>
                        <div class="detail-order">
                            <div class="detail-row">
                                <span class="detail-label">Nama Buket</span>
                                <span class="detail-value">Buket Lily Premium</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">Request Khusus</span>
                                <span class="detail-value">Full pink</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">Ucapan</span>
                                <span class="detail-value">Selamat ulang tahun</span>
                            </div>
                        </div>

                        <h6 class="modal-section-title">Informasi Pemesan</h6>
                        <div class="detail-customer">
                            <div class="detail-row">
                                <span class="detail-label">Nama Lengkap</span>
                                <span class="detail-value">Budi Susanto</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">WhatsApp</span>
                                <span class="detail-value">089673665678</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">Tanggal Pengambilan</span>
                                <span class="detail-value">10 Nov 2025</span>
                            </div>
                        </div>
                    </div>

                    <div class="col-12 col-md-6 mt-4 mt-md-0">
                        <h6 class="modal-section-title">Pembayaran</h6>

                        <div class="payment-box">
                            <div class="detail-row align-items-center">
                                <span class="detail-label">Status</span>
                                <span class="badge bg-success-subtle rounded-pill px-3 py-2">Terbayar</span>
                            </div>

                            <div class="detail-row align-items-center">
                                <span class="detail-label">Total</span>
                                <span class="detail-value">Rp 150.000</span>
                            </div>

                            <div class="detail-row align-items-start">
                                <span class="detail-label d-block ">Bukti Pembayaran</span>
                                <div class="proof-img-wrapper" onclick="showImage('{{ asset('img/invoice.jpg') }}')">
                                    <img src="{{ asset('img/invoice.jpg') }}" class="proof-img">
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{{-- RIWAYAT FOTO --}}
<div class="modal fade text-left" id="riwayatFoto" tabindex="-1" role="dialog" aria-labelledby="myModalLabel1"
    aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
        <div class="modal-content">

            <div class="modal-header">
                <h5 class="modal-title" id="myModalLabel1">Detail Riwayat Pesanan Foto</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>

            <div class="modal-body">
                <div class="row gx-3">

                    <div class="col-12 col-md-6 h-100">

                        <h6 class="modal-section-title">Rincian Pesanan</h6>
                        <div class="detail-order ">
                            <div class="detail-row">
                                <span class="detail-label">Tanggal Booking</span>
                                <span class="detail-value">Kamis 10 Juni 2025</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">Waktu Booking</span>
                                <span class="detail-value">10.00</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">Paket Foto</span>
                                <span class="detail-value">Single</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">Additional</span>
                                <div class="detail-value">
                                    <span class="item">Kostum boneka</span><br>
                                    <small class="amount">x1</small>
                                </div>
                            </div>
                        </div>

                        <h6 class="modal-section-title">Informasi Pemesan</h6>
                        <div class="detail-customer">
                            <div class="detail-row">
                                <span class="detail-label">Nama Lengkap</span>
                                <span class="detail-value">Budi Susanto</span>
                            </div>

                            <div class="detail-row">
                                <span class="detail-label">WhatsApp</span>
                                <span class="detail-value">089673665678</span>
                            </div>
                        </div>
                    </div>

                    <div class="col-12 col-md-6 mt-4 mt-md-0 h-100 d-flex flex-column">

                        <h6 class="modal-section-title">Pembayaran</h6>

                        <div class="payment-box flex-grow-1 d-flex flex-column justify-content-between">

                            <div>
                                <div class="detail-row align-items-center">
                                    <span class="detail-label">Status</span>
                                    <span class="badge bg-success-subtle rounded-pill px-3 py-2">Terbayar</span>
                                </div>

                                <div class="detail-row align-items-center">
                                    <span class="detail-label">Total</span>
                                    <span class="detail-value">Rp 150.000</span>
                                </div>
                            </div>

                            <div class="detail-row align-items-start mt-3">
                                <span class="detail-label d-block">Bukti Pembayaran</span>
                                <div class="proof-img-wrapper" onclick="showImage('{{ asset('img/invoice.jpg') }}')">
                                    <img src="{{ asset('img/invoice.jpg') }}" class="proof-img">
                                </div>
                            </div>

                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

{{-- MODAL GAMBAR --}}
<div class="modal fade" id="modalImagePreview" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered modal-lg">
        <div class="modal-content bg-transparent border-0 shadow-none">

            <div class="modal-body p-0 text-center">
                <img id="img-preview-target" src="" class="img-fluid rounded shadow-lg"
                    style="max-height: 85vh;">
            </div>

        </div>
    </div>
</div>

<script>
    function showImage(src) {
        var modalImg = document.getElementById('img-preview-target');
        modalImg.src = src;
        var myModal = new bootstrap.Modal(document.getElementById('modalImagePreview'));
        myModal.show();
    }
</script>
