/* auth.css */

/* Main Login Container - centered card on gradient */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #e8eef4 0%, #f0f4f8 50%, #ffffff 100%);
  animation: fadeIn 0.6s ease-in-out;
  padding: 24px;
}

/* Page Transition Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Page Transition Effects */
.page-transition {
  animation: fadeIn 0.6s ease-in-out;
}

.page-transition-enter {
  opacity: 0;
  transform: translateX(100px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.page-transition-exit {
  opacity: 1;
  transform: translateX(0);
}

.page-transition-exit-active {
  opacity: 0;
  transform: translateX(-100px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Centered login card wrapper */
.login-form-wrapper {
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: scaleIn 0.5s ease-out both;
}

.signup-form-wrapper {
  width: 100%;
  max-width: 540px;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: scaleIn 0.5s ease-out both;
}

/* Single white card - floating style */
.login-card {
  width: 100%;
  background: #ffffff;
  border-radius: 16px;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.08),
    0 2px 12px rgba(0, 0, 0, 0.04);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Logo - small, top center */
.logo-container {
  margin-bottom: 24px;
}

.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Welcome block */
.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.welcome-text {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.welcome-subtitle {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
  font-weight: 400;
}

/* Form */
.form.simple-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Google button - white, bordered, subtle shadow */
.google-button {
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.google-button:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.google-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Divider */
.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 2px;
  color: #9ca3af;
  font-size: 13px;
}

.form-divider::before,
.form-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.form-field {
  width: 100%;
}

.field-error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

.google-disabled-message {
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  background: #f9fafb;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* Legacy form container (if still used elsewhere) */
.login-form-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
}

.login-form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Form */
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Forgot Password */
.forgot-password {
  text-align: right;
  margin-top: -6px;
}

.forgot-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-link:hover {
  color: #4b5563;
  text-decoration: underline;
}

/* Error Message */
.error-message {
  background: #f8d7da;
  color: #c1272d;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid #f5c6cb;
  text-align: center;
}

/* Login Button - dark purple */
.login-button {
  width: 100%;
  padding: 14px 16px;
  background: #c1272d;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(91, 33, 182, 0.25);
}

.login-button:hover:not(:disabled) {
  background: #c1272d;
  box-shadow: 0 4px 12px rgba(91, 33, 182, 0.3);
}

.login-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-button:active:not(:disabled) {
  transform: translateY(0);
}

/* Sign Up Link */
.signup-link-container {
  text-align: center;
  margin-top: 24px;
}

.signup-text {
  color: #6b7280;
  font-size: 14px;
  margin-right: 4px;
}

.signup-link {
  background: none;
  border: none;
  color: #5b21b6;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 0;
}

.signup-link:hover {
  color: #4c1d95;
  text-decoration: underline;
}

/* OTP helpers */
.back-button {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 16px;
}

.otp-info {
  text-align: center;
  margin-bottom: 20px;
  color: #6b7280;
  font-size: 14px;
}

.otp-email {
  font-weight: 600;
  color: #111827;
}

.otp-resend {
  text-align: center;
  margin-bottom: 20px;
}

.otp-resend-button {
  background: none;
  border: none;
  color: #5b21b6;
  cursor: pointer;
  font-size: 14px;
  text-decoration: underline;
}

/* Right Side - Image */
.login-image-container {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  background: #f8ecec;
  padding: 40px 20px;
  animation: slideInLeft 0.8s ease-out;
}

.login-image {
  width: 100%;
  max-width: 700px;
  height: auto;
  object-fit: contain;
  transform: rotate(331deg);
  transition: transform 0.3s ease;
}

.login-image:hover {
  transform: rotate(331deg) scale(1.05);
}

/* Special animation for register image */
.register-image {
  animation: bounceIn 1.2s ease-out 0.3s both;
}

.register-image:hover {
  transform: rotate(331deg) scale(1.1);
  transition: transform 0.4s ease;
}

/* Responsive Design - login card */
@media (max-width: 480px) {
  .login-container {
    padding: 16px;
  }

  .login-card {
    padding: 28px 24px;
  }

  .welcome-text {
    font-size: 24px;
  }

  .welcome-subtitle {
    font-size: 13px;
  }

  .logo {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 768px) {
  .login-form-container,
  .login-image-container {
    flex: none;
    min-height: auto;
  }

  .logo {
    width: 48px;
    height: 48px;
  }
}

/* Legacy styles for backward compatibility */
.auth-container-simple {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #f8ecec;
}

.auth-box {
  background: #fff;
  padding: 30px 40px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 350px;
  text-align: center;
}

.auth-box h3 {
  margin-bottom: 20px;
  font-weight: 600;
  color: #333;
}

.auth-box .form-control {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border 0.2s ease;
}

.auth-box .form-control:focus {
  border-color: #c1272d;
}

.auth-btn {
  width: 100%;
  background: #4a90e2;
  border: none;
  padding: 10px 0;
  color: #fff;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.auth-btn:hover {
  background: #357ab7;
}

.toggle-text {
  margin-top: 15px;
  font-size: 14px;
  color: #555;
}

.toggle-btn {
  background: none;
  border: none;
  color: #4a90e2;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

/* --- Signup toggle buttons --- */
.signup-toggle {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.signup-toggle .toggle-option {
  flex: 1;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: #f8ecec;
  color: #555;
  cursor: pointer;
  transition: all 0.3s ease;
}

.signup-toggle .toggle-option:hover {
  background: #e9ecef;
}

.signup-toggle .toggle-option.active {
  background: #4a90e2;
  color: #fff;
  font-weight: 600;
}

.register-image {
  transform: none !important;
}
