{% set status = reservation.status %}

<!-- Reservation number and status -->
<p style="margin: 0 0 10px 0;">
    <strong style="font-size: 18px; color: #333;">Reservation #{{ reservation.number }}</strong>
</p>

<p style="margin: 0 0 20px 0; font-size: 16px; font-weight: bold; display: inline-block; border-radius: 5px; padding: 3px 10px; color: #FFFFFF;
        background: {% if status == 'CONFIRMED' %}#28a745{% elseif status == 'WAITING_PAYMENT' or status == 'OVERDUE' %}#ffc107{% elseif status == 'CANCELLED' %}#dc3545{% else %}#6c757d{% endif %};">

    {% if status == 'WAITING_CONFIRMATION' %}
        AWAITING CONFIRMATION
    {% elseif status == 'WAITING_PAYMENT' %}
        PAYMENT REQUIRED
    {% elseif status == 'OVERDUE' %}
        PAYMENT OVERDUE
    {% elseif status == 'CONFIRMED' %}
        CONFIRMED
    {% elseif status == 'CANCELLED' %}
        CANCELLED
    {% else %}
        STATUS UNKNOWN
    {% endif %}
</p>

<p style="color: #51545E; font-size: 16px; line-height: 1.625; margin-bottom: 25px;">
    {% if status == 'WAITING_CONFIRMATION' %}
        Your reservation has been received and is currently awaiting confirmation from the administration. You will receive an update once it is approved.

    {% elseif status == 'WAITING_PAYMENT' %}
        Your reservation has been created but requires payment to be confirmed. Please follow the provided instructions below to complete your payment.

    {% elseif status == 'OVERDUE' %}
        The payment for your reservation was not completed in time. The reservation is now at risk of cancellation. Please contact us immediately if you still wish to proceed.

    {% elseif status == 'CONFIRMED' %}
        Your reservation has been confirmed. We look forward to welcoming you!

    {% elseif status == 'CANCELLED' %}
        {% if reservation.cancellation.cancelledBy == 'guest' %}
            Your reservation has been cancelled at your request. Please refer to the cancellation policy below for details about any applicable penalties or refunds.
        {% elseif reservation.cancellation.cancelledBy == 'admin' %}
            Your reservation has been cancelled by the property. Please contact us if you have any questions or would like to rebook.
        {% elseif reservation.cancellation.cancelledBy == 'system' %}
            Your reservation has been automatically cancelled due to non-payment. If you believe this is an error, please contact us immediately.
        {% else %}
            Your reservation has been cancelled. Please refer to the cancellation policy below for more details.
        {% endif %}

    {% else %}
        The status of your reservation is currently unknown. Please contact support for assistance.
    {% endif %}
</p>

{% if status == 'CANCELLED' and reservation.cancellation.reason %}
    <p style="color: #51545E; font-size: 14px; line-height: 1.625; margin: 10px 0 0 0; font-style: italic;">
        <strong>Cancellation reason:</strong> {{ reservation.cancellation.reason }}
    </p>
{% endif %}

<!-- Separator -->
<hr style="border: none; border-top: 1px solid #EAEAEC; margin: 30px 0;" />
