<?php
declare(strict_types=1);
?>
<section class="content-section form-section">
    <div class="container narrow-container auth-card">
        <p class="eyebrow"><?= quaeriva_t($translator, 'auth.reset_password') ?></p>
        <h1><?= quaeriva_t($translator, 'auth.reset_title') ?></h1>
        <?php if (($error ?? '') !== ''): ?><p class="notice notice-error" role="alert"><?= quaeriva_escape($error) ?></p><?php endif; ?>
        <form class="question-form" method="post" action="<?= quaeriva_escape(quaeriva_url('reset-password')) ?>">
            <input type="hidden" name="_csrf" value="<?= quaeriva_escape($csrfToken) ?>">
            <div class="field-group"><label for="reset-token"><?= quaeriva_t($translator, 'auth.reset_token') ?></label><input id="reset-token" name="token" type="text" required value="<?= quaeriva_escape($token ?? '') ?>"></div>
            <div class="field-group"><label for="reset-password"><?= quaeriva_t($translator, 'auth.new_password') ?></label><input id="reset-password" name="password" type="password" required minlength="8" autocomplete="new-password"></div>
            <button class="button" type="submit"><?= quaeriva_t($translator, 'auth.reset_password') ?></button>
        </form>
    </div>
</section>
