<style>
    @page {
        margin-right: 15px;
        margin-left: 15px;
    }

    body {
        margin-right: 15px;
        margin-left: 15px;
    }
</style>
<div
    style="text-align:  center; font-family: Arial, Helvetica Neue, Helvetica, sans-serif;  font-size: 18px; color:#4D4D4D;">
    <div style="width: 100%; padding: 20px; margin: auto;">
        <div style="display: block; width: 100%;">
            <table style="width: 100%; font-size: 18px;  line-height: 2; color: #4D4D4D;">
                <tbody>
                    <tr>
                        <td width="60%">
                            <img src="data:image/png;base64,{{ base64_encode(file_get_contents('front/images/logo.png')) }}"
                                style="margin:0; padding:0;" width="300" alt="">
                            <h3 style="color:#000;">Customer Information</h3>
                            <p style="line-height: 1.5;">{{ $data['Title'] ?? '' }}. {{ $data['First_Name'] }}
                                {{ $data['Last_Name'] }}<br>
                                {{ $data['Phone_Number'] }}<br>
                                <a style="text-decoration: none; color:#4D4D4D ;" href="mailto:{{ $data['Email'] }}">
                                    {{ $data['Email'] }}</a> <br>
                                {{ $data['Address1'] }} {{ $data['Address2'] }}<br>{{ $data['City'] }} ,
                                {{ $data['Zip'] }}
                            </p>
                        </td>
                        <td valign="top" width="40%" style="text-align:right;">
                            <p style="color:#000; font-weight: 700; margin: 0; padding:0; font-size:34px;">INVOICE</p>

                            <p style="line-height: 1.5; font-weight: bold; color:#000; font-size:20px;">

                                <span style="color:#F7941D;">Invoice #{{ $data['Invoice_Number'] }}</span> <br>
                                DATE : {{ $data['Created_Date_Time'] }}
                            </p>


                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <h3 style="color: #000;  text-align: left; font-weight: bold;">Package</h3>
        <div
            style="font-weight: bold; background-color: #2780E6; color: #fff; font-size: 30px; padding:20px;  text-align: left; border-radius: 30px;">
            {{ $data['Package_Name'] }} Plan <span
                style="float:right;">{{ $data['CURRENCY'] }}{{ $data['Total_Price'] }} / <span
                    style="font-size: 16px;"> {{ $data['Plan'] }}</span> </span>
        </div>
        <h3 style="text-align: left;color: #F7941D; font-weight: bold;">What's Covered</h3>
        <table style="width: 100%; font-size: 16px;  line-height: 2; color: #4D4D4D;">
            <tbody>

                @for ($i = 0; $i < $count; $i++)

                    <tr>
                        {{ $subCount = count($facilities[$i]) }}

                        @for ($j = 0; $j < $subCount; $j++)
                            <td>
                                <img height="15px" width="15px"
                                    src="data:image/png;base64,{{ base64_encode(file_get_contents('front/images/check-mark-png.png')) }} ">
                                </span>

                                @if ($facilities[$i] && $facilities[$i][$j])
                                    {{ $facilities[$i][$j]['title'] ?? '' }}
                                @endif
                            </td>
                        @endfor
                    </tr>

                @endfor


            </tbody>
        </table>

        <table style="width: 100%; font-size: 18px;  line-height: 1.5; color: #4D4D4D; padding-top:30px;">
            <tbody>
                <tr style="font-size: 30px; color:#000;  font-weight: bold; font-size:22px;">
                    <td colspan="2">Net Amount</td>
                    <td style="text-align: right;">{{ $data['CURRENCY'] }}{{ $data['NET_Amount'] }}</td>
                </tr>
                <tr style="font-size: 30px; color:#000; font-weight: bold; font-size:22px;">
                    <td colspan="2">VAT Amount</td>
                    <td style="text-align: right;">{{ $data['CURRENCY'] }}{{ $data['VAT_Amount'] }}</td>
                </tr>

                <tr style="font-size: 30px; color:#F7941D; font-weight: bold; font-size:22px;">
                    <td colspan="2">Total Amount</td>
                    <td style="text-align: right;">{{ $data['CURRENCY'] }}{{ $data['Total_Price'] }}</td>
                </tr>

                <tr style="font-size: 30px; color:#F7941D; font-weight: bold; font-size:22px;">
                    <td colspan="2">&nbsp;</td>
                </tr>

            </tbody>
        </table>

        <p style="color: #000; line-height: 1.5; text-align: left; font-size:16px;">
            © 2023 HomeFlo Ltd. All Rights Reserved. Company Reg No: 12898663. VAT Number: 364048205 <br>
            <span style="color: #F7941D;">Address:</span> Capital Business Centre, 22 Carlton Road, South Croydon, CR2
            0BS
        </p>
    </div>
</div>
