/* Shared layout for the five standalone auth pages only.
   Keep the existing card size; long forms scroll independently of the action. */
.auth-canvas .login-card-equal-height,
.auth-canvas .login-card-equal-height.mfa-step-open {
  height: 720px;
  min-height: 720px;
  grid-template-rows: auto auto 2.1em auto minmax(0, 1fr) 60px;
  /* The title row uses the same responsive size as its heading. */
  font-size: clamp(30px, 5vw, 40px);
}

.auth-canvas .login-card > :not(.login-title) {
  font-size: 16px;
}

.auth-canvas .login-card > .eyebrow {
  font-size: 12px;
}

.auth-canvas .login-brand {
  width: fit-content;
  margin-bottom: 14px;
  border-radius: 6px;
}

.auth-canvas .login-brand:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 5px;
}

.auth-canvas .login-card .login-title {
  max-width: none;
  min-height: 0;
  overflow-wrap: anywhere;
}

.auth-canvas .login-card .login-copy {
  min-height: 64px;
  margin: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

.auth-canvas .login-card .login-form {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 48px;
  gap: 16px;
  min-width: 0;
}

.auth-form-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
  overflow-y: auto;
  overflow-wrap: anywhere;
  scrollbar-gutter: stable;
  /* Leave space for focus outlines inside the scrolling area. */
  padding: 4px;
  scroll-padding-block: 4px;
}

/* Keep the scroll affordance visible when a long state exceeds the card. */
.auth-form-content::-webkit-scrollbar {
  width: 6px;
}

.auth-form-content::-webkit-scrollbar-thumb {
  background: #a8bdb8;
  border-radius: 6px;
}

.auth-form-content > * {
  flex-shrink: 0;
}

.auth-canvas .login-card .login-submit {
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 8px 16px;
  transform: none;
}

.auth-canvas .login-card > .login-links {
  align-content: end;
  align-items: end;
  font-size: 14px;
}

@media (max-width: 540px) {
  .auth-canvas .login-card-equal-height,
  .auth-canvas .login-card-equal-height.mfa-step-open {
    padding: 24px;
    grid-template-rows: auto auto 3.15em auto minmax(0, 1fr) 60px;
  }

  .auth-canvas .login-card .login-copy {
    min-height: 105px;
    font-size: 14px;
    line-height: 1.5;
  }

  .auth-canvas .auth-form-content .field input {
    min-height: 44px;
  }

  .auth-canvas .login-card > .login-links {
    gap: 0 14px;
  }
}

@media (max-width: 360px) {
  .auth-canvas .login-card-equal-height,
  .auth-canvas .login-card-equal-height.mfa-step-open {
    grid-template-rows: auto auto 3.15em auto minmax(0, 1fr) 84px;
  }
}
