{% trans_default_domain 'admin' %}

{% if body_html %}
    {# Sent emails are laid out for a ~570px viewport. Cap their fixed-width tables/images to the
       preview column so the email reflows responsively instead of scrolling horizontally. #}
    <div {{ stimulus_controller('ferienpass/admin-shadow-root') }}>
        <template shadowrootmode="open">
            <style>
                :host { display: block; }
                img, video { max-width: 100%; height: auto; }
                table { max-width: 100%; }
                .w-570 { max-width: 100% !important; }
            </style>
            {{ body_html|raw }}
        </template>
    </div>
{% elseif body_text %}
    <div class="whitespace-pre-wrap px-7 py-6 text-sm leading-relaxed text-gray-700 dark:text-gray-300">{{ body_text }}</div>
{% else %}
    <div class="px-7 py-6 text-sm italic text-gray-400 dark:text-gray-500">{{ 'outbox.noBody'|trans }}</div>
{% endif %}
