/* ============================================================
   Sentimind — Auth Components
   로그인/회원가입, OAuth, 비밀번호 강도, 온보딩
   ============================================================ */

/* ===== Auth Screen ===== */
.auth-screen {
  max-width: 400px;
  margin: 0 auto;
  padding: 3rem 0;
  animation: fadeInUp 500ms cubic-bezier(0.25,0.46,0.45,0.94) both;
}
.auth-screen[hidden] { display: none; }

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo-title {
  font-family: var(--font-diary);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.auth-logo-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--color-primary);
  margin: 0.5rem auto 0;
  border-radius: 1px;
}
.auth-logo-sub {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-top: 0.5rem;
}

.auth-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}
.auth-card-title {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  margin-bottom: 1.25rem;
  text-align: center;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.auth-field label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-weight: var(--weight-medium);
}
.auth-field input {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 200ms ease;
}
.auth-field input:focus {
  border-color: var(--color-primary);
}
.auth-field input[aria-invalid="true"] {
  border-color: var(--color-error);
}
.auth-field-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1.1em;
}

.btn-auth {
  display: block;
  width: 100%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 200ms ease;
  margin-top: 0.5rem;
}
.btn-auth:hover { background: var(--color-primary-hover); }
.btn-auth:active { transform: scale(0.98); }
.btn-auth:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-auth:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.auth-switch {
  text-align: center;
  margin-top: 1rem;
  font-size: var(--text-sm);
  color: var(--color-text-light);
}
.auth-switch-link {
  background: none;
  border: none;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.auth-switch-link:hover { color: var(--color-primary-hover); }
.auth-switch-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.auth-message {
  font-size: 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  text-align: center;
}
.auth-message[hidden] { display: none; }
.auth-message.success { background: var(--color-success-bg); color: var(--color-success); }
.auth-message.error { background: var(--color-error-bg); color: var(--color-error); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}

/* OAuth buttons */
.btn-oauth-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1.2rem;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}
.btn-oauth-google:hover {
  background: var(--color-bg);
  border-color: var(--color-text-muted);
}
.btn-oauth-google:active { transform: scale(0.98); }
.btn-oauth-google:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn-oauth-google:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.oauth-google-icon { flex-shrink: 0; }

/* Password strength indicator */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}
.password-strength-bar {
  flex: 1;
  height: 3px;
  background: var(--color-divider);
  border-radius: 2px;
  transition: background 200ms ease;
}
.password-strength[data-level="weak"] .password-strength-bar:nth-child(1) { background: var(--color-error); }
.password-strength[data-level="fair"] .password-strength-bar:nth-child(1),
.password-strength[data-level="fair"] .password-strength-bar:nth-child(2) { background: #f9a825; }
.password-strength[data-level="good"] .password-strength-bar:nth-child(1),
.password-strength[data-level="good"] .password-strength-bar:nth-child(2),
.password-strength[data-level="good"] .password-strength-bar:nth-child(3) { background: #66bb6a; }
.password-strength[data-level="strong"] .password-strength-bar { background: var(--color-success); }

/* ===== Onboarding ===== */
.onboarding-screen {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 0;
  animation: fadeInUp 500ms cubic-bezier(0.25,0.46,0.45,0.94) both;
}
.onboarding-screen[hidden] { display: none; }

.onboarding-progress {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  transition: all 300ms ease;
}
.onboarding-dot.active {
  background: var(--color-primary);
  width: 24px;
  border-radius: 4px;
}
.onboarding-dot.completed {
  background: var(--color-primary);
}

.onboarding-card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 2rem 1.5rem;
  text-align: center;
  animation: fadeInUp 400ms cubic-bezier(0.25,0.46,0.45,0.94) both;
}
.onboarding-card[hidden] { display: none; }

.onboarding-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}
.onboarding-title {
  font-family: var(--font-diary);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-text);
  margin-bottom: 0.75rem;
  line-height: var(--leading-tight);
  text-wrap: balance;
}
.onboarding-desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
  margin: 0 auto 1.5rem;
  max-width: var(--measure-copy);
  text-wrap: pretty;
}

.onboarding-sample {
  background: var(--gradient-response);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
  text-align: left;
}
.onboarding-sample-text {
  font-family: var(--font-diary);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: var(--leading-relaxed);
}

.onboarding-time-select {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.onboarding-time-btn {
  background: var(--color-surface-warm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  transition: all 200ms ease;
}
.onboarding-time-btn:hover {
  border-color: var(--color-primary);
}
.onboarding-time-btn[aria-pressed="true"] {
  background: rgba(196, 139, 108, 0.2);
  border-color: var(--color-primary);
  font-weight: 500;
}
.onboarding-time-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.onboarding-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}
.btn-onboarding-next {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 0.7rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: all 200ms ease;
}
.btn-onboarding-next:hover { background: var(--color-primary-hover); }
.btn-onboarding-next:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.btn-onboarding-skip {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0.7rem 1rem;
  transition: color 200ms ease;
}
.btn-onboarding-skip:hover { color: var(--color-text-light); }
.btn-onboarding-skip:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }


/* ===== Inline Style Extractions ===== */

/* Auth switch spacing variants */
.auth-switch--sm { margin-top: 0.5rem; }
.auth-switch--md { margin-top: 1rem; }

/* Welcome / Signup complete screen */
.welcome-card {
  text-align: center;
  padding: 3rem 2rem;
}
.welcome-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.welcome-title {
  font-family: var(--font-diary);
  font-size: var(--text-xl);
  line-height: var(--leading-tight);
  text-wrap: balance;
  margin-bottom: 0.75rem;
}
.welcome-desc {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin: 0 auto 2rem;
  max-width: var(--measure-copy);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}
.welcome-start-btn { width: 100%; }
