/* Authentication surfaces. */

.auth-page {
  background: var(--color-background);
}

.auth-navbar-inner,
.auth-navbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.auth-navbar-inner {
  justify-content: space-between;
  min-width: 0;
}

.auth-navbar-actions {
  flex-shrink: 0;
}

.auth-navbar .navbar-nav {
  flex-direction: row;
}

.auth-navbar .dropdown {
  position: relative;
}

.auth-navbar .dropdown-menu {
  position: absolute;
}

.auth-secondary-link {
  flex-shrink: 0;
}

/* The page: the form centred on the screen, and on a desktop the brand
   panel beside it (`account/auth_layout.html`, `docs/aesthetic.md`). */
.auth-main {
  display: grid;
  flex: 1 0 auto;
  padding: clamp(1rem, 4vw, 3rem);
  place-items: center;
}

.auth-split {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1fr);
  max-width: 30rem;
  width: 100%;
}

/* What Kovalent is, on the home hero's teal (`portal.css`,
   `.marketplace-hero`, which this page does not load). Desktop only: it holds
   nothing the form needs, so a phone gets the form and nothing above it. */
.auth-brand {
  display: none;
}

@media (min-width: 992px) {
  .auth-split {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
    max-width: 68rem;
  }

  .auth-brand {
    align-content: center;
    background: linear-gradient(135deg, var(--color-brand), var(--color-brand-hover));
    border-radius: var(--radius-panel);
    color: var(--color-on-brand);
    display: grid;
    gap: 1rem;
    padding: var(--panel-pad);
  }
}

.auth-brand-mark {
  block-size: 4rem;
  inline-size: 4rem;
}

.auth-brand-eyebrow {
  color: var(--color-brand-soft);
  font-weight: 700;
  margin: 0.5rem 0 0;
}

.auth-brand-promise {
  font-family: var(--font-heading);
  font-size: var(--text-heading);
  font-variant-numeric: lining-nums;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

/* Live counts or nothing (`includes/proof_list.html`): the figures in the
   soft brand tint the home hero uses for them. */
.auth-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0.5rem 0 0;
  opacity: 0.92;
}

.auth-proof strong {
  color: var(--color-brand-soft);
  font-size: 1.35em;
}

/* One width for every form, sign-up included: it asks less than it did. */
.auth-container {
  align-self: center;
  width: 100%;
}

.auth-card {
  border-radius: var(--radius-card);
  padding: var(--card-pad);
}

.auth-card-header {
  margin-bottom: 1.25rem;
}

.auth-card-header .success-mark {
  margin-bottom: 1rem;
}

.auth-title {
  font-size: var(--text-heading);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.auth-subtitle,
.auth-card-footer,
.auth-confirmation-copy {
  color: var(--text-muted);
}

/* A page whose title says it all has no subtitle; its empty line goes. */
.auth-subtitle:empty {
  display: none;
}

.auth-card-footer {
  margin-top: 1rem;
}

/* The email submit stands as tall as the fields above it and the Telegram
   button over them (`base.css`, `.btn.btn-telegram`): a shorter button read
   as the lesser way in. `.btn.` outranks the 44px touch floor. */
.btn.auth-submit {
  align-items: center;
  display: inline-flex;
  font-weight: 600;
  justify-content: center;
  min-height: var(--field-height);
  width: 100%;
}

.auth-password-field {
  position: relative;
}

.auth-password-field .form-control {
  padding-inline-end: 3rem;
}

.auth-password-toggle {
  align-items: center;
  border: 0;
  color: var(--text-muted);
  display: inline-flex;
  inset-block: 0;
  inset-inline-end: 0.125rem;
  justify-content: center;
  position: absolute;
  /* 44px, like every target a finger aims at (Fitts). */
  width: 2.75rem;
  /* Above a floating label, which Bootstrap lifts to 2. */
  z-index: 3;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
  color: var(--accent-primary);
}

.auth-password-checklist,
.auth-password-match,
.auth-email-suggestion {
  color: var(--text-muted);
  display: none;
  font-size: var(--text-sm);
  margin-top: 0.5rem;
}

.auth-password-checklist.is-visible {
  display: block;
}

/* Hidden until auth.js marks them visible. A bare `display: flex` here used
   to outrank the `display: none` above, so the empty lines always showed. */
.auth-password-match.is-visible {
  display: flex;
}

/* "Did you mean aziza@gmail.com?" -- muted, not a warning: the address as
   typed is still accepted, and the fix is one tap (Postel's Law). */
.auth-email-suggestion.is-visible {
  display: block;
}

.auth-email-suggestion-fix {
  font-size: inherit;
  padding: 0;
  vertical-align: baseline;
}

/* On a touch screen the fix is a 44px target, like every other (Fitts). */
@media (max-width: 991.98px), (pointer: coarse) {
  .auth-email-suggestion.is-visible {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.25rem;
  }

  .auth-email-suggestion-fix {
    align-items: center;
    display: inline-flex;
    min-height: 2.75rem;
  }
}

.auth-password-checklist-title {
  margin-bottom: 0.5rem;
}

.auth-password-checklist-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-password-checklist-item {
  display: flex;
}

.auth-password-checklist-item,
.auth-password-match {
  align-items: center;
  gap: 0.5rem;
}

/* Advice the browser cannot check (common passwords, your own details):
   never ticked, set in line with the ticked rules' text. */
.auth-password-checklist-item.is-advice {
  padding-inline-start: 1.5rem;
}

.auth-password-checklist-item.is-met,
.auth-password-match.is-match {
  color: var(--accent-primary);
}

.auth-password-match.is-mismatch {
  color: var(--accent-secondary);
}

/* The small links around the form -- forgotten password, the wordmark --
   are 44px rows on a touch screen (Fitts). */
@media (max-width: 991.98px), (pointer: coarse) {
  .auth-navbar .portal-navbar-brand,
  a[href*="password/reset"] {
    align-items: center;
    display: inline-flex;
    min-height: 2.75rem;
  }
}

/* One line under the form instead of the site's doormat footer. */
.auth-footer {
  align-items: center;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  gap: 0.25rem 1.25rem;
  justify-content: center;
  padding: 1rem clamp(1rem, 4vw, 3rem) 1.5rem;
}

.auth-footer a {
  color: inherit;
}

@media (max-width: 991.98px), (pointer: coarse) {
  .auth-footer a {
    align-items: center;
    display: inline-flex;
    min-height: 2.75rem;
  }
}
