/*
 * Auth page styles for sign-in, kitchen creation, invitation acceptance,
 * email change verification, and similar standalone pages that use the
 * minimal auth layout.
 *
 * Auth pages share the gingham background and content card from
 * base.css — the <main> element IS the card. This file adds only
 * form and typography styles specific to auth flows.
 *
 * Collaborators: auth layout (layouts/auth.html.erb),
 *   SessionController, KitchensController, InvitationsController,
 *   EmailChangesController, TransfersController
 */

.auth-page {
  margin: 0;
}

.auth-container h1 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: normal;
  color: var(--text);
  margin: 0 0 0.25rem;
  line-height: var(--leading-tight);
}

.auth-subtitle {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin: 0 0 1.75rem;
  line-height: var(--leading-body);
}

.auth-field {
  margin-bottom: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.auth-field input {
  width: 100%;
}

.auth-field-consent {
  margin-bottom: 1.25rem;
}

.auth-field-consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0;
  line-height: 1.5;
}

.auth-field-consent input[type="checkbox"] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  width: auto;
}

.auth-submit {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  margin-top: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: white;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 4px;
  cursor: pointer;
  transition: background var(--duration-fast) ease,
              border-color var(--duration-fast) ease;
}

@media (hover: hover) {
  .auth-submit:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
  }
}

.auth-submit:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.auth-alternate {
  margin-top: 1.5rem;
}

.auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-4) 0;
  font-size: 0.875rem;
  color: var(--text-soft);
  text-transform: lowercase;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.auth-error-inline {
  min-height: 1.5rem;
  margin-top: 0.75rem;
  color: var(--danger);
}

.auth-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  padding: 0.6rem 0.75rem;
  background: var(--red-light);
  border-radius: 4px;
  line-height: var(--leading-body);
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.auth-footer a {
  color: var(--red);
  text-decoration: none;
}

@media (hover: hover) {
  .auth-footer a:hover {
    text-decoration: underline;
  }
}

/* Small screens */
@media (max-width: 480px) {
  .auth-container h1 {
    font-size: 1.5rem;
  }
}
