/* auth.css - Thiết kế trang Đăng nhập / Đăng ký / Quên mật khẩu - Cobalt Prime */

.auth-section {
  padding: 100px 0 120px;
  background-color: var(--bg-main);
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

/* Background Gradients */
.auth-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(255, 70, 100, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 20% 80%, rgba(22, 136, 212, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.auth-container {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.auth-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo img {
  height: 40px;
  width: auto;
  margin: 0 auto;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-heading);
  text-align: center;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 32px;
}

.auth-subtitle a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-subtitle a:hover {
  color: var(--primary-dark);
}

/* Social Buttons */
.auth-social-wrap {
  margin-bottom: 24px;
}

.btn-google-login {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  color: var(--text-heading);
  font-size: 0.92rem;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-google-login:hover {
  background-color: var(--bg-main);
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.btn-google-login svg {
  width: 18px;
  height: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1.5px solid var(--border-color);
}

.auth-divider:not(:empty)::before {
  margin-right: 16px;
}

.auth-divider:not(:empty)::after {
  margin-left: 16px;
}

/* Form Styles Override */
.auth-form .form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.auth-form .form-control {
  height: 48px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xs);
  font-size: 0.9rem;
  color: var(--text-heading);
  background-color: var(--bg-main);
  padding: 0 16px;
  transition: all 0.2s ease;
}

.auth-form .form-control:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 70, 100, 0.1);
  outline: none;
}

.auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.auth-form-options .form-check-label {
  color: var(--text-main);
  font-weight: 500;
  user-select: none;
  cursor: pointer;
}

.auth-form-options a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-form-options a:hover {
  color: var(--primary);
}

.btn-submit-auth {
  width: 100%;
  height: 48px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-glow);
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-form-alert {
  display: none;
  font-size: 0.85rem;
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  margin-bottom: 20px;
}

/* ============================================================
   GOOGLE SIGN-IN SIMULATION OVERLAY
   ============================================================ */
.google-overlay-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.google-overlay-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.google-modal {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(226, 232, 240, 0.8);
  overflow: hidden;
  font-family: Roboto, Arial, sans-serif;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.google-overlay-backdrop.active .google-modal {
  transform: scale(1);
}

.google-header {
  padding: 32px 32px 16px;
  text-align: center;
}

.google-logo-svg {
  width: 74px;
  height: 24px;
  margin-bottom: 16px;
}

.google-title {
  font-size: 1.35rem;
  color: #202124;
  font-weight: 400;
  margin-bottom: 6px;
}

.google-subtitle {
  font-size: 0.95rem;
  color: #5f6368;
}

.google-subtitle span {
  color: #1a73e8;
  font-weight: 500;
}

/* Google Account Selection List */
.google-accounts-list {
  padding: 8px 0 24px;
  border-bottom: 1px solid #dadce0;
}

.google-account-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.google-account-item:hover {
  background-color: #f7f8f9;
}

.google-account-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #dadce0;
}

.google-account-info {
  flex: 1;
}

.google-account-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #3c4043;
}

.google-account-email {
  font-size: 0.78rem;
  color: #5f6368;
}

.google-use-another {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.google-use-another:hover {
  background-color: #f7f8f9;
}

.google-use-another-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #dadce0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a73e8;
}

.google-use-another-text {
  font-size: 0.88rem;
  font-weight: 500;
  color: #1a73e8;
}

.google-footer {
  padding: 16px 32px 24px;
  font-size: 0.75rem;
  color: #5f6368;
  line-height: 1.4;
}

.google-footer a {
  color: #1a73e8;
  text-decoration: none;
}

.google-footer a:hover {
  text-decoration: underline;
}

/* Loading/Signing in Screen within Google Modal */
.google-signing-in {
  display: none;
  padding: 48px 32px;
  text-align: center;
}

.google-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1a73e8;
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: google-spin 1s linear infinite;
}

@keyframes google-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.google-signing-text {
  font-size: 1rem;
  font-weight: 500;
  color: #202124;
  margin-bottom: 8px;
}

.google-signing-sub {
  font-size: 0.85rem;
  color: #5f6368;
}

/* Responsive adjustments */
@media (max-width: 575px) {
  .auth-card {
    padding: 28px 20px;
  }

  .google-modal {
    max-width: 90%;
  }

  .google-header,
  .google-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .google-account-item,
  .google-use-another {
    padding-left: 20px;
    padding-right: 20px;
  }
}