<tr>
    <td width="30"></td>

    <td valign="top" align="center" bgcolor="#242424" style="background-color:#242424;">
        <table
            cellpadding="0"
            cellspacing="0"
            border="0"
            align="center"
            bgcolor="#fff"
            color="#344853"
            style="color: #344853; border-radius: 40px; background-color:#fff; font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;"
            width="100%">
            <tr>
                <td width="60"></td>

                <td align="center" valign="top">
                    <table cellpadding="0" cellspacing="0" border="0" width="100%">
                        <tr>
                            <td>
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td height="30"></td>
                                    </tr>

                                    <tr>
                                        <td valign="top" align="center" style="font-size: 24px; line-height: 28px; font-weight: 500">
                                            Your {{ $enquiry ? 'enquiry' : 'reservation' }}
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top" height="20"></td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <table cellpadding="0" cellspacing="0" border="0" width="100%">
                                    <tr>
                                        <td valign="top">
                                            <table cellpadding="0" cellspacing="0" border="0" width="100%" style="font-size: 18px; line-height: 22px; font-weight: 300">

                                                @if ($enquiry && $vehicle)
                                                    <tr>
                                                        <td valign="top">
                                                            Vehicle
                                                        </td>
                                                        <td valign="top" style="font-weight: 500">
                                                            {{ $vehicle['Make'] ? $vehicle['Make'] : '' }}
                                                            {{ $vehicle['Model'] ? $vehicle['Model'] : '' }}
                                                            {{ $vehicle['Derivative'] ? $vehicle['Derivative'] : '' }}
                                                        </td>
                                                    </tr>

                                                    @if (isset($vehicle['Mileage']))
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top">
                                                                Mileage
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                {{ number_format($vehicle['Mileage']) }} miles
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                    @endif

                                                    @if (isset($vehicle['Registration']))
                                                        <tr>
                                                            <td valign="top">
                                                                Registration
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                {{ $vehicle['Registration'] }}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                    @endif

                                                    @if (isset($vehicle['RetailValue']))
                                                        <tr>
                                                            <td valign="top">
                                                                Price
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                &pound;{{ number_format($vehicle['RetailValue']) }}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                    @endif
                                                @else

                                                    @if (isset($details->vehicle))
                                                        <tr>
                                                            <td valign="top">
                                                                Vehicle
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                {{ $details->vehicle?->make?->name }}
                                                                {{ $details->vehicle?->model?->name }}
                                                                {{ $details->vehicle?->derivative }}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top">
                                                                Mileage
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                {{ number_format($details->vehicle?->odometer_mi) }} miles
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top">
                                                                Registration
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                {{ $details->vehicle?->registration_number }}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top">
                                                                Price
                                                            </td>
                                                            <td valign="top" style="font-weight: 500">
                                                                &pound;{{ number_format($details->vehicle?->price) }}
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                    @endif
                                                @endif

                                                @if (isset($details['name']))
                                                    <tr>
                                                        <td valign="top">
                                                            {{ $enquiry ? 'Enquired' : 'Reserved' }} by
                                                        </td>
                                                        <td valign="top" style="font-weight: 500">
                                                            {{ $details['name'] }}
                                                        </td>
                                                    </tr>
                                                @endif

                                                @if (isset($details['email']))
                                                        <tr>
                                                            <td valign="top" height="10"></td>
                                                        </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            E-mail
                                                        </td>
                                                        <td valign="top" style="font-weight: 500">
                                                            {{ $details['email'] }}
                                                        </td>
                                                    </tr>
                                                @endif

                                                @if (isset($details['contact_number']))
                                                    <tr>
                                                        <td valign="top" height="10"></td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            Phone number
                                                        </td>
                                                        <td valign="top" style="font-weight: 500">
                                                            {{ $details['contact_number'] }}
                                                        </td>
                                                    </tr>
                                                @endif

                                                @if (isset($details['message']))
                                                    <tr>
                                                        <td valign="top" height="10"></td>
                                                    </tr>
                                                    <tr>
                                                        <td valign="top">
                                                            Message
                                                        </td>
                                                        <td valign="top" style="font-weight: 500">
                                                            {{ $details['message'] }}
                                                        </td>
                                                    </tr>
                                                @endif
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>

                <td width="60"></td>
            </tr>

            <tr>
                <td height="30"></td>
            </tr>
        </table>
    </td>

    <td width="30"></td>
</tr>

<tr>
    <td height="30"></td>
</tr>
