/*
 * auth.css — Golf Practice Buddy auth pages (login + register)
 * Two-panel split layout: brand panel (left) + form panel (right)
 */

/* ─── Layout ──────────────────────────────────────────────────── */

.auth-layout {
  display: flex;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
}

.auth-brand {
  flex: 0 0 45%;
  background-color: #00163c;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3rem 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.auth-form-panel {
  flex: 1;
  background: #f8f9fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1.5rem;
  min-height: 100vh;
}

/* ─── Brand Panel ─────────────────────────────────────────────── */

.auth-logo {
  display: block;
  max-width: 180px;
  margin-bottom: 2rem;
}

.auth-tagline {
  font-size: clamp(1.4rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 0.5rem;
  color: #fff;
}

.auth-tagline-sub {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.auth-proof {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.auth-proof li {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.85);
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-proof li::before {
  content: "✓";
  color: #ff6500;
  font-weight: 700;
  flex-shrink: 0;
}

.auth-brand-cta {
  margin-top: auto;
}

.auth-brand-cta p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.75rem;
}

/* ─── App Download Links ──────────────────────────────────────── */

.auth-app-links {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.auth-app-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.auth-app-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-app-badge img {
  height: 38px;
  width: auto;
  display: block;
  opacity: 0.92;
  transition: opacity 0.2s;
}

.auth-app-badge:hover img {
  opacity: 1;
}

/* ─── Referral Banner ─────────────────────────────────────────── */

.auth-referral-banner {
  background: rgba(40, 167, 69, 0.12);
  border: 1px solid rgba(40, 167, 69, 0.35);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: #155724;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-referral-banner .auth-referral-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ─── Form Card ───────────────────────────────────────────────── */

.auth-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,22,60,0.10);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 420px;
}

.auth-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00163c;
  margin-bottom: 0.25rem;
}

.auth-card-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.75rem;
}

/* ─── Progress Steps (register only) ─────────────────────────── */

.auth-steps {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.75rem;
}

.auth-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: background 0.25s;
}

.auth-step-dot.active {
  background: #ff6500;
  width: 24px;
  border-radius: 5px;
}

.auth-step-dot.done {
  background: #28a745;
}

/* ─── Form Fields ─────────────────────────────────────────────── */

.auth-field {
  margin-bottom: 1rem;
  position: relative;
}

.auth-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.35rem;
  letter-spacing: 0.02em;
}

.auth-field input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.auth-field input:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.auth-field input::placeholder {
  color: #9ca3af;
}

.auth-field .toggle-pass {
  position: absolute;
  right: 0.75rem;
  bottom: 0;
  height: 2.4rem; /* matches input height */
  display: flex;
  align-items: center;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.9rem;
  padding: 0 0.25rem;
  line-height: 1;
  background: none;
  border: none;
  outline: none;
}

.auth-field .toggle-pass:hover {
  color: #374151;
}

/* ─── Buttons ─────────────────────────────────────────────────── */

.auth-btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: #ff6500;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-align: center;
  letter-spacing: 0.02em;
}

.auth-btn-primary:hover {
  background: #e05900;
}

.auth-btn-primary:active {
  transform: translateY(1px);
}

.auth-btn-primary:disabled {
  background: #f0a070;
  cursor: not-allowed;
}

/* ─── Divider ─────────────────────────────────────────────────── */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #9ca3af;
  font-size: 0.8rem;
}

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

/* ─── SSO Buttons ─────────────────────────────────────────────── */

.auth-sso-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Google's rendered button needs centering */
.auth-sso-buttons .g_id_signin {
  width: 100% !important;
  text-align: center;
}

.auth-sso-buttons .g_id_signin > div {
  width: 100% !important;
}

#appleid-signin {
  width: 100%;
  height: 40px;
  cursor: pointer;
}

/* ─── Error / Success Messages ────────────────────────────────── */

.auth-error {
  background: #fff5f5;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: #b91c1c;
  margin-bottom: 1rem;
  display: none;
}

.auth-error.visible {
  display: block;
}

/* ─── Footer Links ────────────────────────────────────────────── */

.auth-footer-links {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.auth-footer-links a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

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

.auth-copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.auth-continue-btn {
  margin-bottom: 1rem;
}

.auth-continue-btn.hidden {
  display: none;
}

/* ─── Animated step reveal ────────────────────────────────────── */

.auth-step2 {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease;
}

.auth-step2.visible {
  opacity: 1;
}

/* ─── Referral code badge (when cookie present) ───────────────── */

.auth-referral-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(40,167,69,0.1);
  border: 1px solid rgba(40,167,69,0.3);
  border-radius: 20px;
  padding: 0.35rem 0.8rem;
  font-size: 0.8rem;
  color: #155724;
  font-weight: 600;
  margin-bottom: 1rem;
}

.auth-referral-badge i {
  color: #28a745;
}

/* ─── Responsive ──────────────────────────────────────────────── */

/* Tablet (768px – 991px): 40/60 split */
@media (max-width: 991px) {
  .auth-brand {
    flex: 0 0 40%;
    padding: 2rem 2rem 1.5rem;
  }
}

/* Mobile: brand collapses to slim header strip */
@media (max-width: 767px) {
  .auth-layout {
    flex-direction: column;
  }

  .auth-brand {
    flex: none;
    position: static;
    height: auto;
    min-height: 0;
    padding: 1.25rem 1.5rem;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    overflow: visible;
  }

  .auth-brand-body {
    display: none;
  }

  .auth-logo {
    max-width: 120px;
    margin-bottom: 0;
  }

  .auth-brand-mobile-tagline {
    display: block;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    font-style: italic;
  }

  .auth-brand-mobile-tagline strong {
    display: block;
    font-size: 0.95rem;
    color: #ff6500;
    font-style: normal;
    font-weight: 700;
  }

  .auth-form-panel {
    padding: 1.5rem 1rem;
    justify-content: flex-start;
  }

  .auth-card {
    padding: 1.5rem 1.25rem;
    border-radius: 10px;
  }

  .auth-referral-banner {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-card {
    box-shadow: none;
    border-radius: 0;
    padding: 1.25rem 1rem;
  }

  .auth-form-panel {
    padding: 1rem 0;
    background: #fff;
  }
}
