/* ═══════════════════════════════════════════════════════════════════
   NeverHodl™ Auth Pages — Shared Styles
   Sprint 1 · 2026-04
═══════════════════════════════════════════════════════════════════ */

/* Prevent CSS display properties from overriding the HTML hidden attribute */
[hidden] { display: none !important; }

.auth-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--bg-base);
}

.auth-logo {
  margin-bottom: 32px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* Official NeverHodl™ logo — identical to dashboard */
.nv6-logo-monogram {
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
  font-family: Inter, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  gap: 0;
}
.nv6-logo-monogram > * { margin: 0; padding: 0; }
.nv6-logo-never { color: #F5F5F7; }
.nv6-logo-hodl {
  color: #D4A843;
  text-decoration: line-through;
  text-decoration-color: #EF4444;
  text-decoration-thickness: 1.5px;
}
.nv6-logo-tm {
  color: #6B7280;
  font-size: 0.55em;
  vertical-align: super;
  margin-left: 1px;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 40px 36px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 28px;
}

.auth-oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border-default);
  transition: background var(--t-fast);
  margin-bottom: 10px;
}
.auth-oauth-btn-google { background: #fff; color: #1f1f1f; }
.auth-oauth-btn-google:hover { background: #f1f1f1; }
.auth-oauth-btn-x { background: #000; color: #fff; border-color: #333; }
.auth-oauth-btn-x:hover { background: #111; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-tertiary);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.auth-field { margin-bottom: 16px; }

.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 12px;
  min-height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--t-fast);
  outline: none;
}
.auth-input:focus { border-color: var(--gold-400); outline: 2px solid rgba(212,168,67,.3); outline-offset: 1px; }
.auth-input[readonly] { opacity: 0.7; cursor: default; }

.auth-input-wrap { position: relative; }
.auth-input-wrap .auth-input { padding-right: 40px; }

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.auth-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}
.auth-select:focus { border-color: var(--gold-400); }

.auth-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.auth-checkbox-row input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--gold-400);
  cursor: pointer;
  flex-shrink: 0;
}
.auth-checkbox-label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.auth-checkbox-label a { color: var(--gold-400); text-decoration: underline; }

.auth-submit-btn {
  width: 100%;
  padding: 12px;
  min-height: 44px;
  background: var(--gold-400);
  color: var(--text-on-gold);
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--t-fast), opacity var(--t-fast);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.auth-submit-btn:hover { background: var(--gold-500); }
.auth-submit-btn:focus-visible { outline: 2px solid var(--gold-400); outline-offset: 2px; }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-submit-btn .btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(0,0,0,.2); border-top-color: #060810; border-radius: 50%; animation: auth-spin .6s linear infinite; }
.auth-submit-btn.loading .btn-spinner { display: inline-block; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.cf-turnstile { margin: 12px 0 4px; }

.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}
.auth-footer-link a { color: var(--gold-400); font-weight: 500; }

.auth-info-box {
  background: var(--bg-overlay);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  margin: 8px 0 20px;
}
.auth-info-box .auth-icon { font-size: 36px; margin-bottom: 10px; }
.auth-info-box p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}
.auth-info-box .auth-email-highlight {
  color: var(--gold-400);
  font-family: var(--font-mono);
  font-size: 13px;
}

.auth-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--bg-overlay);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-primary);
  opacity: 0;
  transition: opacity var(--t-base), transform var(--t-base);
  pointer-events: none;
  z-index: 1000;
  max-width: min(340px, calc(100vw - 32px));
  text-align: center;
}
.auth-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.auth-toast.error { border-color: var(--danger); color: var(--danger); }
.auth-toast.success { border-color: var(--success); color: var(--success); }

.auth-link-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 14px;
}
.auth-link-row a {
  font-size: 13px;
  color: var(--gold-400);
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

/* Verified badge */
.auth-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16,185,129,0.12);
  color: var(--success);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 8px;
}

/* Copy button */
.auth-copy-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background var(--t-fast);
  margin-left: 8px;
}
.auth-copy-btn:hover { background: var(--bg-overlay); color: var(--text-primary); }

/* Section header */
.auth-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 28px 0 14px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
}

/* Tier badge */
.auth-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}
.auth-tier-badge.free { background: var(--bg-hover); color: var(--text-secondary); }
.auth-tier-badge.pro  { background: var(--gradient-gold); color: var(--text-on-gold); }

/* Danger zone */
.auth-danger-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  color: var(--danger);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--t-fast);
  margin-top: 8px;
}
.auth-danger-btn:hover { background: rgba(239,68,68,0.08); }

/* Logout btn */
.auth-logout-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
  transition: background var(--t-fast);
}
.auth-logout-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* Modal overlay */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}
.auth-modal-overlay[hidden] {
  display: none !important;
}
.auth-modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
}
.auth-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.auth-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.auth-modal-cancel {
  flex: 1;
  padding: 10px;
  background: var(--bg-hover);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}
.auth-modal-confirm {
  flex: 1;
  padding: 10px;
  background: var(--gold-400);
  border: none;
  border-radius: 8px;
  color: var(--text-on-gold);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ── Mobile ≤ 480px ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 32px 20px; }
  .auth-input, .auth-select { min-height: 44px; padding: 12px 14px; font-size: 16px; }
  .auth-submit-btn { min-height: 48px; font-size: 16px; }
  .auth-wrap { padding: 24px 12px; }
}

/* ── Reduced motion (WCAG 2.3.3) ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .auth-toast { transition: none; }
  .auth-input { transition: none; }
  .auth-submit-btn { transition: none; }
  .auth-submit-btn .btn-spinner { animation: none; }
  .auth-spinner { animation-duration: 2s; }
}
