<h2 style="color: #333; font-size: 18px; margin-bottom: 15px;">Jak do nas dotrzeć</h2>

{% set accommodationCategory = reservation.accommodation.type.accommodationCategory %}
{% set isPrivateAccommodation = accommodationCategory in ['unit'] %}

{% if isPrivateAccommodation and reservation.accommodation.type.contactInfo %}
    {% set contactInfo = reservation.accommodation.type %}
    {% set contactDetails = reservation.accommodation.type.contactInfo %}
    {% set phone = contactDetails.phone|default(contacts.phone) %}
    {% set email = contactDetails.email|default(contacts.email) %}
    {% set address = contactDetails.address|default(contacts.address.address) %}
    {% set checkInInstructions = contactDetails.checkInInstructions|default('') %}
{% else %}
    {% set contactInfo = contacts %}
    {% set contactDetails = contacts %}
    {% set phone = contactDetails.phone %}
    {% set email = contactDetails.email %}
    {% set address = contactDetails.address.address %}
    {% set checkInInstructions = '' %}
{% endif %}

<!-- Contact information -->
<p style="color: #51545E; font-size: 15px; line-height: 1.8; margin-bottom: 20px;">
    <strong style="font-size: 16px; color: #333;">{{ contactInfo.name }}</strong><br/>
    <strong>Adres:</strong> {{ address }}<br/>
    <strong>Telefon:</strong> <a href="tel:{{ phone }}" style="color: #3869D4; text-decoration: none;">{{ phone }}</a><br/>
    <strong>Email:</strong> <a href="mailto:{{ email }}" style="color: #3869D4; text-decoration: none;">{{ email }}</a>
</p>

{% if checkInInstructions and showCheckInInstructions|default(true) %}
    <p><strong>Instrukcje zameldowania</strong></p>
    <p>{{ checkInInstructions }}</p>
{% endif %}

<!-- Quick action buttons -->
<table class="body-action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation" style="margin: 25px 0;">
    <tr>
        <td align="center">
            <table width="100%" border="0" cellspacing="0" cellpadding="0" role="presentation">
                <tr>
                    <td align="center" style="padding: 0 10px;">
                        <a href="tel:{{ phone }}"
                           class="f-fallback button button--green"
                           style="margin: 5px; font-size: 14px; padding: 10px 15px;">
                            ZADZWOŃ
                        </a>
                    </td>
                    <td align="center" style="padding: 0 10px;">
                        <a href="mailto:{{ email }}"
                           class="f-fallback button"
                           style="margin: 5px; font-size: 14px; padding: 10px 15px;">
                            WYŚLIJ EMAIL
                        </a>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>

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