/* Account pages (/accounts/), scoped to body.auth. Paper-on-ink, brand green.
   The gutter lives here rather than in markup; see allauth/layouts/base.html. */

body.auth {
  --auth-fg: #F5F5F0;
  --auth-dim: rgba(245, 245, 240, 0.62);
  --auth-faint: rgba(245, 245, 240, 0.45);
  --auth-panel: #1C1C1A;
  --auth-line: rgba(221, 221, 213, 0.18);
  --auth-brand: #F2A516;
  --auth-danger: #F87171;
}

body.auth main#main {
  /* `margin-inline: auto` centres this, and an auto cross-axis margin on a
     flex item turns stretch off — so without an explicit width the column
     shrink-wraps the card and never reaches `max-width` at all. */
  width: 100%;
  max-width: 420px;
  margin-inline: auto;
  padding: 64px 20px;
  /* Inherited, so it reaches allauth markup carrying no class of ours without
     touching the hand-written templates, which all set their own. */
  color: var(--auth-fg);
}

/* Set by allauth/layouts/manage.html. */
body.auth.auth-wide main#main {
  max-width: 620px;
}

@media (min-width: 640px) {
  body.auth main#main {
    padding-block: 96px;
  }
}

body.auth .auth-messages {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 20px 0;
}

/* The strip already puts space above the page, so the gutter's full top
   padding on top of it reads as a hole. */
body.auth .auth-messages ~ main#main {
  padding-top: 32px;
}

body.auth .auth-messages p {
  margin: 0 0 6px;
  border-radius: 5px;
  border: 1px solid var(--auth-line);
  background: var(--auth-panel);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--auth-dim);
}

body.auth .auth-h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--auth-fg);
}

body.auth .auth-h2 {
  margin: 40px 0 8px;
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--auth-fg);
}

body.auth .auth-p {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--auth-dim);
}

body.auth .auth-p a {
  color: var(--auth-brand);
  text-decoration: none;
}

body.auth .auth-p a:hover {
  text-decoration: underline;
}

body.auth .auth-hr {
  margin: 28px 0;
  border: 0;
  border-top: 1px solid var(--auth-line);
}

body.auth .auth-form {
  margin: 0 0 8px;
  border-radius: 10px;
  border: 1px solid var(--auth-line);
  background: var(--auth-panel);
  padding: 24px;
}

/* allauth sets no_visible_fields on the sign-out confirm, where a card would
   frame nothing but a button. */
body.auth .auth-form-bare {
  border: 0;
  background: transparent;
  padding: 0;
}

body.auth .auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.auth .auth-actions:empty {
  display: none;
}

body.auth .auth-field {
  margin: 0 0 16px;
}

body.auth .auth-label,
body.auth .auth-fields label {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--auth-dim);
}

body.auth .auth-input,
body.auth .auth-fields input,
body.auth .auth-fields textarea {
  width: 100%;
  border-radius: 5px;
  border: 1px solid var(--auth-line);
  background: #111110;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--auth-fg);
}

body.auth .auth-input::placeholder,
body.auth .auth-fields input::placeholder {
  color: var(--auth-faint);
}

body.auth .auth-input:focus,
body.auth .auth-fields input:focus,
body.auth .auth-fields textarea:focus {
  outline: none;
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 3px rgba(242, 165, 22, 0.25);
}

body.auth .auth-field-radio,
body.auth .auth-field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

body.auth .auth-choice {
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--auth-brand);
}

body.auth .auth-choice-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--auth-fg);
}

body.auth .auth-help,
body.auth .auth-fields .helptext {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--auth-faint);
}

/* `as_p` nests the password rules in <p><span class="helptext"><ul>, and the
   parser hoists that <ul> clear of both, leaving it with no class of its own. */
body.auth .auth-help ul,
body.auth .auth-fields ul {
  margin: 4px 0 16px;
  padding-left: 16px;
  list-style: disc;
}

body.auth .auth-help li,
body.auth .auth-fields li {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--auth-faint);
}

body.auth .auth-fields p {
  margin: 0 0 16px;
}

body.auth .auth-field-errors ul,
body.auth .auth-fields .errorlist {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

body.auth .auth-field-errors li,
body.auth .auth-fields .errorlist li {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--auth-danger);
}

body.auth .auth-btn {
  display: inline-block;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--auth-brand);
  padding: 11px 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: #111110;
  text-decoration: none;
  transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.auth .auth-btn:hover {
  opacity: 0.88;
}

body.auth .auth-btn-secondary {
  background: transparent;
  border-color: var(--auth-line);
  color: var(--auth-fg);
}

body.auth .auth-btn-secondary:hover {
  border-color: var(--auth-brand);
  color: var(--auth-brand);
  opacity: 1;
}

body.auth .auth-btn-danger {
  background: transparent;
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--auth-danger);
}

body.auth .auth-btn-danger:hover {
  border-color: var(--auth-danger);
  opacity: 1;
}

/* The :not() covers the bare <a> some allauth templates put in the actions
   slot with no {% element %} around it. */
body.auth .auth-btn-quiet,
body.auth .auth-actions a:not(.auth-btn) {
  display: inline-block;
  align-self: center;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 11px 4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-dim);
  text-decoration: none;
}

body.auth .auth-btn-quiet:hover,
body.auth .auth-actions a:not(.auth-btn):hover {
  color: var(--auth-brand);
  opacity: 1;
}

body.auth .auth-btn:focus-visible {
  outline: 2px solid var(--auth-brand);
  outline-offset: 2px;
}

body.auth .auth-badge {
  display: inline-block;
  border-radius: 999px;
  border: 1px solid var(--auth-line);
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--auth-dim);
}

body.auth .auth-badge-danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--auth-danger);
}

body.auth .auth-badge-ok {
  border-color: rgba(242, 165, 22, 0.35);
  color: var(--auth-brand);
}

body.auth .auth-badge-warn {
  border-color: var(--auth-line);
  color: var(--auth-dim);
}

body.auth .auth-badge-primary {
  border-color: rgba(245, 245, 240, 0.35);
  color: var(--auth-fg);
}
