/*
The account pages. Signed out (account/base.html): a dark aside beside a white panel, no header or footer; below lg
the aside goes and the panel carries the brand. Signed in (allauth/layouts/manage.html's card): the profile, the
e-mail addresses, the password and the connected accounts. The fields themselves are form_tags' (layout.css).
*/

/* ---- the signed-out layout ---- */

.auth {
  display: grid;
  min-height: 100dvh;
  @media (width >= 64rem) { grid-template-columns: minmax(0, 1fr) 470px; }
}
.auth-aside {
  display: none;
  flex-direction: column;
  padding: 46px 52px;
  @media (width >= 64rem) { display: flex; }
}
/* white on the dark neutral, a step above its own text */
.auth-brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--neutral-bright);
}
.auth-tagline {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.auth-quote {
  margin-top: auto;
  & blockquote {
    max-width: 420px;
    margin-bottom: 0.875rem;
    font-size: 1.5rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--neutral-bright);
  }
  & figcaption { font-size: 11.5px; }
}
.auth-panel {
  display: flex;
  flex-direction: column;
  padding: 2.25rem 1.5rem;
  @media (width >= 40rem) { padding: 2.75rem 46px; }
}
/* the brand the hidden aside would show */
.auth-logo {
  margin-bottom: 2.5rem;
  font-size: 19px;
  font-weight: 700;
  @media (width >= 64rem) { display: none; }
}
.auth-messages {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.auth-content h1 { margin-bottom: 0.375rem; }
/* the way to the other form, at the bottom of a tall screen and after the form on a short one */
.auth-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 0.75rem;
  line-height: 1rem;
  @media (width >= 64rem) { margin-top: auto; }
}

/* ---- the signed-out forms ---- */

/* the line under the title */
.auth-intro {
  margin-bottom: 26px;
  font-size: 13px;
}
.auth-form { margin-top: 1.5rem; }
.auth-alt {
  margin-top: 1rem;
  text-align: center;
  font-size: 13px;
}
.auth-note {
  margin-top: 1rem;
  font-size: 0.75rem;
  line-height: 1rem;
}
.auth-google svg { width: 1rem; height: 1rem; }
.auth-google-terms {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1rem;
}
/* "ili" between two rules */
.auth-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-block: 1.25rem;
  font-size: 0.75rem;
  line-height: 1rem;
  &::before, &::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
  }
}
/* the signup form's trap for bots: off-screen, but still in the form. allauth puts the field itself 99999px to the
   right of this box, which made the page scroll sideways for that far; the box clips it. */
.auth-honeypot {
  position: absolute;
  left: -9999px;
  overflow: hidden;
}
.auth-content .cf-turnstile { margin-bottom: 1rem; }

/* ---- what both share ---- */

/* a message in place of a form */
.account-text {
  font-size: 15px;
  & > p + p { margin-top: 0.75rem; }
}
/* the button under a form's fields */
.account-submit { margin-top: 0.5rem; }

/* ---- the signed-in pages ---- */

.account-form { max-width: 28rem; }
/* the assistant's settings (chat/settings.html): a wider box for its text */
.account-settings { max-width: 36rem; }
/* a field written in the template, laid out like form_tags' */
.account-field {
  margin-bottom: 0.5rem;
  & .input { width: 100%; }
  & .account-actions { margin-top: 0.5rem; }
}
.account-intro { margin-bottom: 1rem; }
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.account-text + .account-actions { margin-top: 1.5rem; }
.account-section {
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.account-back {
  margin-bottom: 0.5rem;
  font-size: 13px;
}

/* the e-mail addresses and the connected accounts: one radio row each */
.account-choices {
  display: grid;
  gap: 0.5rem;
  & + .btn { margin-top: 1rem; }
}
.account-choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
  cursor: pointer;
  /* the chosen address or account */
  &:has(.radio:checked) {
    border-color: var(--color-primary);
    background: color-mix(in oklab, var(--color-primary) 4%, transparent);
  }
}
.account-address {
  flex: 1;
  font-weight: 500;
}
.account-provider { font-weight: 600; }

/* ---- the profile ---- */

.account-profile {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  @media (width >= 40rem) { flex-direction: row; }
}
.account-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  @media (width >= 40rem) { width: 10rem; }
  & img {
    width: 8rem;
    height: 8rem;
    border: 1px solid var(--line);
    border-radius: 50%;
    object-fit: cover;
  }
}
.account-details { flex: 1; }
.account-more {
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  font-size: 13px;
}
