{% extends "base.html" %}

{% block title %}Check Your Inbox — {{ config.APP_NAME }}{% endblock %}

{% block content %}
<main class="container-page">
  <div class="auth-card text-center">
    <div class="text-4xl mb-4">&#9993;</div>
    <h1>Check your inbox</h1>
    <p class="subtitle">We sent a sign-in link to:</p>

    <p class="font-mono text-espresso bg-latte rounded-lg px-4 py-2 mb-4 text-sm">{{ email }}</p>

    <p class="text-sm text-stone mb-6">Click the link in the email to sign in. It expires in {{ config.MAGIC_LINK_EXPIRY_MINUTES }} minutes.</p>

    <hr>

    <details class="faq-item text-left">
      <summary>Didn't receive the email?</summary>
      <div class="pb-4">
        <ul class="list-disc pl-5 space-y-1 text-sm text-stone mb-4">
          <li>Check your spam folder</li>
          <li>Make sure the email address is correct</li>
          <li>Wait a minute and try again</li>
        </ul>
        <form method="post" action="{{ url_for('auth.resend') }}">
          <input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
          <input type="hidden" name="email" value="{{ email }}">
          <button type="submit" class="btn-outline btn-sm">Resend link</button>
        </form>
      </div>
    </details>
  </div>
</main>
{% endblock %}
