/* ===================================================================
   GrooVVee — Auth Module Styles
   =================================================================== */

/* ── Auth Container Layout ──────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--space-6);
  position: relative;
  z-index: 1;
}

/* ── Auth Card ──────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  padding: var(--space-10) var(--space-8);
  backdrop-filter: blur(32px);
  box-shadow: var(--shadow-xl), 0 0 80px rgba(28, 28, 30, 0.12);
  animation: auth-card-enter 0.6s var(--ease-out) forwards;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 28, 30,0.6), rgba(28, 28, 30,0.4), transparent);
}

@keyframes auth-card-enter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Auth Logo / Header ─────────────────────────────────────────── */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.auth-logo .logo-icon-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
}

/* Shrink padding/margins on short phone screens so less of the card needs
   scrolling to reach — the card (logo + tabs + form + demo hints) is
   comfortably taller than a typical phone viewport otherwise. */
@media (max-width: 480px) {
  .auth-card { padding: var(--space-6) var(--space-5); }
  .auth-logo { margin-bottom: var(--space-5); }
  .auth-demo-hint { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); }
}

.auth-logo .logo-icon {
  width: 40px;
  height: 40px;
}

.auth-logo .logo-text {
  font-size: 1.75rem;
}

.auth-tagline {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: -var(--space-6);
  margin-bottom: var(--space-6);
}

/* ── Auth Tabs ──────────────────────────────────────────────────── */
.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.04);
  border-radius: var(--radius-lg);
  padding: 3px;
  border: 1px solid var(--border-subtle);
  margin-bottom: var(--space-7);
}

.auth-tab {
  flex: 1;
  padding: 0.5625rem var(--space-4);
  border-radius: calc(var(--radius-lg) - 3px);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-base);
  cursor: pointer;
  background: none;
  border: none;
  text-align: center;
}

.auth-tab.active {
  background: var(--text-primary);
  color: var(--text-inverse);
  box-shadow: none;
}

.auth-tab:hover:not(.active) {
  color: var(--text-secondary);
}

/* ── Auth Form ──────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.auth-form .form-group { gap: var(--space-2); }

/* ── Submit button ──────────────────────────────────────────────── */
.auth-submit {
  margin-top: var(--space-2);
  position: relative;
}

.auth-loading-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}

.btn--loading .auth-loading-spinner { display: block; }
.btn--loading .btn-label { display: none; }

/* ── Footer links ───────────────────────────────────────────────── */
.auth-footer {
  margin-top: var(--space-6);
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-footer a, .auth-link {
  color: var(--primary-600);
  cursor: pointer;
  font-weight: 500;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  font-size: inherit;
  text-decoration: none;
}

.auth-footer a:hover, .auth-link:hover { color: var(--primary-700); }

/* ── Forgot password view ───────────────────────────────────────── */
.auth-back {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-6);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color var(--transition-fast);
}

.auth-back:hover { color: var(--text-primary); }
.auth-back svg { width: 16px; height: 16px; }

/* ── View transitions ───────────────────────────────────────────── */
.auth-view {
  animation: auth-view-enter var(--duration-base) var(--ease-out) forwards;
}

@keyframes auth-view-enter {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* ── Success state ──────────────────────────────────────────────── */
.auth-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  padding: var(--space-6) 0;
  animation: auth-view-enter var(--duration-base) var(--ease-out) forwards;
}

.auth-success__icon {
  width: 64px;
  height: 64px;
  background: rgba(28, 28, 30, 0.15);
  border: 2px solid rgba(28, 28, 30, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success-500);
}

.auth-success__icon svg { width: 32px; height: 32px; }

/* ── Demo credentials hint ──────────────────────────────────────── */
.auth-demo-hint {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: rgba(28, 28, 30, 0.06);
  border: 1px solid rgba(28, 28, 30, 0.15);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.auth-demo-hint strong { color: var(--accent-700); }

.auth-demo-hint__title {
  font-weight: 600;
  color: var(--accent-700);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
