@if(!empty($enquiry->reason))
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Registration</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ strtoupper($enquiry->reason?->registration) }}
        </td>
    </tr>
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Vehicle Make/Model</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->make }}
            {{ $enquiry->reason?->model }}
        </td>
    </tr>
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Derivative</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->derivative }}
        </td>
    </tr>
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Mileage</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->mileage }}
        </td>
    </tr>
    @if(!empty($enquiry->reason?->body_type))
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Body type</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->body_type }}
        </td>
    </tr>
    @endif
    @if(!empty($enquiry->reason?->colour))
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Colour</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->colour }}
        </td>
    </tr>
    @endif
    <tr>
        <td colspan="2" style="padding: 10px;">
            <p style="font-size: 0.85em; color: #333; margin: 0;">
                Retail is the dealer forecourt price. The three condition-based figures are part-exchange
                offers — what a dealer would pay for the vehicle based on its condition.
            </p>
        </td>
    </tr>
    @if($valuation_email_price_to_show == 'all')
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Retail value</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->adjusted_retail_price ?? $enquiry->reason?->retail_price }}
            <p style="font-size: 0.8em; color: #333; margin-bottom: 0;">The suggested market retail valuation for the vehicle.</p>
        </td>
    </tr>
    @endif
    @if(
        !empty($enquiry->reason?->clean_price)
        && in_array($valuation_email_price_to_show, ['all', 'clean_price'])
    )
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Clean value</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->adjusted_clean_price ?? $enquiry->reason?->clean_price }}
            <p style="font-size: 0.8em; color: #333; margin-bottom: 0;">Showroom condition — no reconditioning needed, unmarked paint and trim, complete service history, both keys present.</p>
        </td>
    </tr>
    @endif
    @if(
        !empty($enquiry->reason?->average_price)
        && in_array($valuation_email_price_to_show, ['all', 'average_price'])
    )
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Average value</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->adjusted_average_price ?? $enquiry->reason?->average_price }}
            <p style="font-size: 0.8em; color: #333; margin-bottom: 0;">Average condition — may need some light mechanical or paintwork reconditioning, documented service history.</p>
        </td>
    </tr>
    @endif
    @if(
        !empty($enquiry->reason?->below_price)
        && in_array($valuation_email_price_to_show, ['all', 'below_price'])
    )
    <tr>
        <td width="32%" valign="top" style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            <strong>Below value</strong>
        </td>
        <td width="58%" valign="middle"
            style="border-bottom:1px solid {{ $layerAccentColour }};padding: 10px;">
            {{ $enquiry->reason?->adjusted_below_price ?? $enquiry->reason?->below_price }}
            <p style="font-size: 0.8em; color: #333; margin-bottom: 0;">Below average condition — requires mechanical or bodywork repairs, service history may be limited.</p>
        </td>
    </tr>
    @endif
@endif
