/**
 * Crown HerCare - Auth Module Styles
 * Login, Register, OTP, Splash, Onboarding
 */

/* Auth pages background */
.auth-page {
  background: var(--bg-primary);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Splash Screen */
.splash-container {
  position: fixed;
  inset: 0;
  background: var(--gradient-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all 0.6s ease;
}

.splash-container.fade-out {
  opacity: 0;
  transform: scale(1.1);
  pointer-events: none;
}

.splash-logo {
  width: 100px;
  height: 100px;
  background: white;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  animation: splashFloat 3s ease-in-out infinite;
}

.splash-logo svg {
  width: 60px;
  height: 60px;
}

.splash-brand {
  color: white;
  font-size: 28px;
  font-weight: 800;
  margin-top: 24px;
  letter-spacing: 0.5px;
}

.splash-tagline {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin-top: 8px;
}

.splash-loader {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-top: 40px;
}

@keyframes splashFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Onboarding */
.onboarding-container {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
}

.onboarding-slides {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.onboarding-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}

.onboarding-slide.active {
  opacity: 1;
  transform: translateX(0);
}

.onboarding-slide.prev {
  opacity: 0;
  transform: translateX(-100%);
}

.onboarding-image {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px rgba(107, 76, 230, 0.2);
}

.onboarding-image svg {
  width: 120px;
  height: 120px;
  fill: white;
}

.onboarding-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 12px;
}

.onboarding-desc {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.6;
  max-width: 300px;
}

.onboarding-footer {
  padding: 24px 32px calc(24px + env(safe-area-inset-bottom, 0px));
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.onboarding-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-medium);
  transition: all 0.3s ease;
}

.onboarding-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary);
}

/* Auth Container */
.auth-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  overflow-y: auto;
}

.auth-header {
  text-align: center;
  padding-top: 48px;
  margin-bottom: 32px;
}

.auth-logo {
  width: 72px;
  height: 72px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(107, 76, 230, 0.25);
}

.auth-logo svg {
  width: 40px;
  height: 40px;
  fill: white;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* Auth Form */
.auth-form {
  flex: 1;
}

.auth-footer {
  text-align: center;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

/* Social Auth */
.social-auth {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.social-btn:active {
  background: var(--bg-tertiary);
  transform: scale(0.98);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  color: var(--text-tertiary);
  font-size: 13px;
}

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

/* OTP Page */
.otp-container {
  text-align: center;
}

.otp-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.otp-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.otp-email {
  color: var(--primary);
  font-weight: 600;
}

.otp-timer {
  font-size: 14px;
  color: var(--text-tertiary);
  margin-top: 24px;
}

.otp-resend {
  margin-top: 24px;
  font-size: 14px;
}

.otp-resend a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.otp-resend.disabled a {
  color: var(--text-tertiary);
  pointer-events: none;
}

/* Password strength indicator */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-light);
  transition: all 0.3s ease;
}

.password-strength-bar.weak { background: var(--danger); }
.password-strength-bar.fair { background: var(--warning); }
.password-strength-bar.good { background: var(--info); }
.password-strength-bar.strong { background: var(--success); }

.password-strength-label {
  font-size: 12px;
  margin-top: 4px;
  color: var(--text-tertiary);
}

/* Terms checkbox */
.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.terms-check input {
  margin-top: 2px;
}

.terms-check label {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.terms-check a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Auth links */
.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -8px;
  margin-bottom: 20px;
}

.auth-links a {
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* Success/Error states */
.auth-message {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-message.success {
  background: var(--success-light);
  color: var(--success);
}

.auth-message.error {
  background: var(--danger-light);
  color: var(--danger);
}

/* Forgot password success */
.reset-sent {
  text-align: center;
  padding: 40px 24px;
}

.reset-sent-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.reset-sent-icon svg {
  width: 40px;
  height: 40px;
  color: var(--primary);
}
