/* ABOUTME: Page-specific styles for the logged-out Devise auth screens (sign in, */

/* ABOUTME: sign up, account settings, forgot/reset password) on the ps-* design system. */

/* ===== Page shell: vertically centered brand + card, no member nav ===== */
.ps-auth-page { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; gap: 22px; padding: 32px 0; }

.ps-auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.ps-auth-logo { max-height: 52px; width: auto; object-fit: contain; }
.ps-auth-wordmark { font-family: var(--font-display, serif); font-size: 34px; font-weight: 600; letter-spacing: -.02em; color: var(--accent-ink); line-height: 1; }

/* Header reuses .ph typography (eyebrow/title) but centered, no back button */
.ps-auth-head { justify-content: center; text-align: center; padding: 0 2px; }
.ps-auth-head .ph-id { flex: none; }

/* ===== Flash banners (classes are load-bearing test hooks: keep alert/alert-success/alert-error) ===== */
.ps-auth-page .alert { border-radius: var(--radius-tile); font-size: 14px; }

/* ===== OAuth buttons (Google, Apple) ===== */
.ps-auth-oauth-group { display: flex; flex-direction: column; gap: 10px; }

.ps-auth-oauth {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; width: 100%; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--rule); box-shadow: var(--specular), var(--e1);
  color: var(--ink); font-size: 15px; font-weight: 600;
  transition: box-shadow .15s var(--ease-out), background .15s var(--ease-out);
}
.ps-auth-oauth svg { width: 20px; height: 20px; flex: 0 0 auto; }

@media (hover: hover) { .ps-auth-oauth:hover { background: var(--paper-2); box-shadow: var(--specular), var(--e2); } }
.ps-auth-oauth:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Apple's brand guidelines: solid black surface, white mark and label. The doubled
   class outranks the design-system `.ps-page a { color: inherit }` reset, which would
   otherwise dim the label to body ink on the native anchor (link_to) variant. */
.ps-auth-oauth.ps-auth-oauth--apple { background: #000; border-color: #000; color: #fff; }

@media (hover: hover) { .ps-auth-oauth--apple:hover { background: #1a1a1a; } }
.ps-auth-oauth--apple:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.ps-auth-divider { position: relative; text-align: center; margin: 18px 0; }
.ps-auth-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--rule); }
.ps-auth-divider span { position: relative; background: var(--paper); padding: 0 12px; color: var(--ink-faint); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ===== Form fields ===== */
.ps-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.ps-field-label { font-size: 13px; font-weight: 700; color: var(--ink-soft); }
.ps-field-hint { font-size: 12px; color: var(--ink-faint); }

.ps-field-input {
  min-height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink);
  font-family: var(--font-ui); font-size: 16px;
}
.ps-field-input::placeholder { color: var(--ink-faint); }
.ps-field-input:focus-visible { outline: 3px solid var(--orange); outline-offset: 1px; }

.ps-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 18px; }
.ps-auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.ps-auth-remember input { width: 17px; height: 17px; accent-color: var(--orange); cursor: pointer; }
.ps-auth-link { font-size: 13px; font-weight: 700; color: var(--accent-ink); }
.ps-auth-link:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }

.ps-auth-submit {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px;
  border-radius: 14px; background: var(--orange); color: #fff; font-size: 16px; font-weight: 700;
  box-shadow: 0 3px 10px rgb(232 116 59/30%), 0 14px 28px -14px rgb(232 116 59/70%);
  transition: box-shadow .15s var(--ease-out);
}

@media (hover: hover) { .ps-auth-submit:hover { box-shadow: 0 3px 10px rgb(232 116 59/40%), 0 18px 34px -14px rgb(232 116 59/80%); } }
.ps-auth-submit:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.ps-auth-rule { margin: 18px 0; border: 0; border-top: 1px solid var(--rule); }

/* ===== Footnotes below the card ===== */
.ps-auth-footnote { text-align: center; font-size: 13px; color: var(--ink-soft); padding: 0 8px; }
.ps-auth-legal { text-align: center; font-size: 12px; color: var(--ink-faint); }
.ps-auth-legal a { text-decoration: underline; text-underline-offset: 2px; }

.ps-auth-links { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ps-auth-links a { font-size: 13px; font-weight: 600; color: var(--accent-ink); }

/* ===== Account-settings section divider (registrations/edit) ===== */
.ps-auth-section { padding: 18px 0; border-top: 1px solid var(--rule); margin: 18px 0; }
.ps-auth-section-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 14px; }
.ps-auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.ps-auth-actions .ps-auth-submit { width: auto; flex: 1; }
.ps-auth-cancel { font-size: 15px; font-weight: 600; color: var(--ink-soft); }
.ps-auth-cancel:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 8px; }
.ps-field-warning { font-size: 12px; color: var(--warning-600); margin-top: 2px; }
