<?php
declare(strict_types=1);
$returnUrl = trim((string) ($returnUrl ?? quaeriva_url()));
if ($returnUrl === '') $returnUrl = quaeriva_url();
?>
<section class="content-section form-section">
    <div class="container narrow-container auth-card">
        <p class="eyebrow"><?= quaeriva_t($translator, 'app.name') ?></p>
        <h1><?= quaeriva_escape($title) ?></h1>
        <p class="section-lede"><?= quaeriva_escape($message) ?></p>
        <?php if ($currentUser === null): ?>
            <a class="button" href="<?= quaeriva_escape(quaeriva_url('login', ['redirect' => $returnUrl])) ?>"><?= quaeriva_t($translator, 'auth.login') ?></a>
        <?php else: ?>
            <a class="button button-secondary" href="<?= quaeriva_escape($returnUrl) ?>"><?= quaeriva_t($translator, 'common.back') ?></a>
        <?php endif; ?>
    </div>
</section>
