/*
 * Styles for pages rendered by django-allauth (MFA, password reset, email
 * confirmation, account-inactive ...). Those pages are built from allauth's
 * {% element %} tags, which emit bare <h1>/<p>/<form>/<button> with no
 * classes, so they cannot be styled with Tailwind utilities. Everything here
 * is scoped under .auth-prose so it never touches the rest of the app.
 * Colours match the Tailwind config (primary #0066CC).
 */
.auth-prose {
  box-sizing: border-box;
  width: 100%;
  max-width: 36rem;
  min-width: 0;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  padding: 1.5rem 2rem;
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.auth-prose h1 { margin: 0 0 1rem; font-size: 1.5rem; line-height: 2rem; font-weight: 700; }
.auth-prose h2 { margin: 1.5rem 0 0.5rem; font-size: 1.125rem; font-weight: 600; }
.auth-prose p { margin: 0.5rem 0 1rem; color: #374151; }
.auth-prose a { color: #0066cc; text-decoration: underline; }
.auth-prose li a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.auth-prose a:hover { color: #004f9f; }
.auth-prose hr { margin: 1.5rem 0; border: 0; border-top: 1px solid #e5e7eb; }
.auth-prose ul { margin: 0.5rem 0 1rem; padding-left: 1.25rem; list-style: disc; }
.auth-prose form > * + * { margin-top: 1rem; }
.auth-prose label { display: block; margin-bottom: 0.25rem; font-weight: 500; color: #374151; }
.auth-prose input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.auth-prose select,
.auth-prose textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  color: #111827;
  font: inherit;
}
.auth-prose input:focus,
.auth-prose select:focus,
.auth-prose textarea:focus {
  outline: 2px solid #0066cc;
  outline-offset: 1px;
  border-color: #0066cc;
}
.auth-prose input[readonly],
.auth-prose textarea[readonly] { background: #f9fafb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.auth-prose textarea { min-height: 12rem; line-height: 1.75; }
.auth-prose img { display: block; margin: 1rem auto; max-width: 12rem; height: auto; }
.auth-prose button,
.auth-prose input[type="submit"] {
  display: inline-block;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border: 1px solid #0066cc;
  border-radius: 0.375rem;
  background: #0066cc;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.auth-prose button:hover,
.auth-prose input[type="submit"]:hover { background: #004f9f; border-color: #004f9f; }
.auth-prose .errorlist { margin: 0.25rem 0; padding: 0; list-style: none; color: #b91c1c; }
.auth-prose .auth-hint {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #bfdbfe;
  border-radius: 0.375rem;
  background: #eff6ff;
  color: #1e3a8a;
}

/* The second button in a pair (e.g. Sign In / Cancel) is the secondary action. */
.auth-prose button + button {
  margin-left: 0.5rem;
  background: #fff;
  color: #374151;
  border-color: #d1d5db;
}
.auth-prose button + button:hover { background: #f3f4f6; border-color: #9ca3af; }

/* A list holding nothing but links (the MFA index's Activate / Deactivate) is a
   row of actions, not prose: no bullets, and each link is a button. */
.auth-prose ul:has(> li > a) { list-style: none; padding-left: 0; }
.auth-prose ul:has(> li > a) li a {
  padding: 0.5rem 1rem;
  border: 1px solid #0066cc;
  border-radius: 0.375rem;
  font-weight: 600;
  text-decoration: none;
}
.auth-prose ul:has(> li > a) li a:hover { background: #eff6ff; }

/* Neighbouring links must not read as one phrase. */
.auth-prose a + a { margin-left: 1rem; }
/* Recovery and reauthentication links are standalone phone actions. */
.auth-prose a[href*="/password/reset/"],
.auth-prose a[href$="/2fa/reauthenticate/"],
.auth-prose a[href$="/recovery-codes/download/"],
.auth-prose a[href$="/recovery-codes/generate/"] {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  min-width: 2.75rem;
}
/* Generating new recovery codes discards every unused one. */
.auth-prose a[href$="/generate/"] { color: #b91c1c; }
