/* ============================================================
   URBAN CLAVE — auth.css
   Styles for Login · Register · OTP · Forgot/Reset Password
   urbanclave.com
   ============================================================ */

/* ── Page shell ── */
.auth-body {
  min-height: 100dvh;
  background-color: var(--clr-bg);
  display: flex;
  flex-direction: column;
}

/* ── Two-column layout: panel left | form right ── */
.auth-page {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100dvh;
}

/* ── Left decorative panel ── */
.auth-panel {
  background-color: var(--clr-primary);
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(232, 51, 60, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(245, 158, 11, 0.10) 0%, transparent 55%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 4rem);
}

/* Subtle grid pattern overlay */
.auth-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* Big decorative circle */
.auth-panel::after {
  content: '';
  position: absolute;
  right: -120px;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(300px, 40vw, 520px);
  height: clamp(300px, 40vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,51,60,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.auth-panel__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.auth-panel__logo-mark {
  width: clamp(36px, 4vw, 48px);
  height: clamp(36px, 4vw, 48px);
  background-color: var(--clr-accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 1.5vw, 1.4rem);
  font-weight: var(--fw-black);
  color: var(--clr-white);
  letter-spacing: var(--ls-tight);
  flex-shrink: 0;
}

.auth-panel__logo-text {
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  font-weight: var(--fw-black);
  color: var(--clr-white);
  letter-spacing: var(--ls-tight);
}

.auth-panel__body {
  position: relative;
  z-index: 1;
}

.auth-panel__tagline {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  font-weight: var(--fw-black);
  color: var(--clr-white);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-bottom: var(--sp-5);
}

.auth-panel__tagline span {
  color: var(--clr-accent);
}

.auth-panel__sub {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--font-secondary);
  line-height: var(--lh-relaxed);
  max-width: 38ch;
}

/* Feature list */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  position: relative;
  z-index: 1;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.auth-feature__icon {
  width: 36px;
  height: 36px;
  background-color: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.auth-feature__text {
  font-size: clamp(0.75rem, 1.1vw, 0.875rem);
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-secondary);
  font-weight: var(--fw-medium);
}

/* ── Right form side ── */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  background-color: var(--clr-white);
  overflow-y: auto;
  min-height: 100dvh;
}

.auth-form-wrap {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.45s ease both;
}

/* Page heading inside form */
.auth-heading {
  margin-bottom: var(--sp-8);
}

.auth-heading__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: var(--fw-black);
  color: var(--clr-text);
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-2);
}

.auth-heading__sub {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  font-family: var(--font-secondary);
  line-height: var(--lh-relaxed);
}

.auth-heading__sub a {
  color: var(--clr-accent);
  font-weight: var(--fw-semibold);
}
.auth-heading__sub a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Form fields stack */
.auth-fields {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

/* Two-col row inside form */
.auth-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin: var(--sp-6) 0;
  color: var(--clr-text-tertiary);
  font-size: var(--fs-xs);
  font-family: var(--font-secondary);
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--clr-border);
}

/* Submit button */
.auth-submit {
  margin-top: var(--sp-2);
}

/* Footer link row */
.auth-footer-link {
  text-align: center;
  margin-top: var(--sp-6);
  font-size: var(--fs-sm);
  font-family: var(--font-secondary);
  color: var(--clr-text-secondary);
}
.auth-footer-link a {
  color: var(--clr-accent);
  font-weight: var(--fw-semibold);
}
.auth-footer-link a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Forgot password link */
.auth-forgot {
  display: flex;
  justify-content: flex-end;
  margin-top: calc(-1 * var(--sp-3));
}
.auth-forgot a {
  font-size: var(--fs-xs);
  font-family: var(--font-secondary);
  color: var(--clr-accent);
  font-weight: var(--fw-semibold);
  transition: opacity var(--t-base);
}
.auth-forgot a:hover { opacity: 0.75; }

/* Terms checkbox */
.auth-terms {
  font-size: var(--fs-xs);
  font-family: var(--font-secondary);
  color: var(--clr-text-secondary);
  line-height: var(--lh-snug);
}
.auth-terms a {
  color: var(--clr-accent);
  font-weight: var(--fw-semibold);
}

/* Password strength */
.pwd-strength {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-2);
}
.pwd-strength__bar {
  flex: 1;
  height: 4px;
  background-color: var(--clr-gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.pwd-strength__fill {
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background-color: var(--clr-error);
  transition: width 0.4s ease, background-color 0.4s ease;
}
.pwd-strength__label {
  font-size: var(--fs-xs);
  font-family: var(--font-secondary);
  font-weight: var(--fw-semibold);
  min-width: 72px;
  text-align: right;
  transition: color 0.4s ease;
  color: var(--clr-text-tertiary);
}

/* OTP page extras */
.otp-heading-email {
  display: inline-block;
  color: var(--clr-accent);
  font-weight: var(--fw-semibold);
  word-break: break-all;
}

.otp-resend-row {
  text-align: center;
  margin-top: var(--sp-5);
  font-size: var(--fs-sm);
  font-family: var(--font-secondary);
  color: var(--clr-text-secondary);
}

.otp-resend-btn {
  background: none;
  border: none;
  color: var(--clr-accent);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: var(--font-secondary);
  transition: opacity var(--t-base);
}
.otp-resend-btn:hover:not(:disabled) { opacity: 0.75; }
.otp-resend-btn:disabled { color: var(--clr-text-tertiary); cursor: default; }

/* Success state (reset password done) */
.auth-success-icon {
  width: 72px;
  height: 72px;
  background-color: var(--clr-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--sp-6);
  animation: scaleIn 0.4s var(--t-bounce) both;
}

/* Step indicator (multi-step) */
.auth-steps {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-8);
}
.auth-step {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.auth-step__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--clr-gray-100);
  border: 2px solid var(--clr-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  color: var(--clr-text-tertiary);
  transition: all var(--t-smooth);
  flex-shrink: 0;
}
.auth-step__dot.is-done {
  background-color: var(--clr-success);
  border-color: var(--clr-success);
  color: var(--clr-white);
}
.auth-step__dot.is-current {
  background-color: var(--clr-accent);
  border-color: var(--clr-accent);
  color: var(--clr-white);
}
.auth-step__label {
  font-size: var(--fs-xs);
  font-family: var(--font-secondary);
  font-weight: var(--fw-medium);
  color: var(--clr-text-tertiary);
}
.auth-step.is-current .auth-step__label { color: var(--clr-text); font-weight: var(--fw-semibold); }
.auth-step.is-done   .auth-step__label { color: var(--clr-success); }
.auth-step__line {
  flex: 1;
  height: 1px;
  background-color: var(--clr-border);
  min-width: var(--sp-6);
}

/* Search dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--clr-white);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  z-index: var(--z-dropdown);
  overflow: hidden;
  display: none;
  animation: fadeInDown var(--t-smooth) ease;
}
.search-dropdown__section { padding: var(--sp-2) 0; }
.search-dropdown__section + .search-dropdown__section {
  border-top: 1px solid var(--clr-border);
}
.search-dropdown__section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--clr-text-tertiary);
}
.search-dropdown__clear {
  background: none;
  border: none;
  font-size: var(--fs-xs);
  color: var(--clr-accent);
  cursor: pointer;
  font-family: var(--font-secondary);
  font-weight: var(--fw-semibold);
  transition: opacity var(--t-base);
}
.search-dropdown__clear:hover { opacity: 0.7; }
.search-dropdown__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  transition: background-color var(--t-base);
  text-decoration: none;
  color: inherit;
}
.search-dropdown__item:hover { background-color: var(--clr-gray-50); }
.search-dropdown__icon { font-size: 0.85rem; color: var(--clr-text-tertiary); flex-shrink: 0; }
.search-dropdown__img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background-color: var(--clr-gray-50);
  flex-shrink: 0;
}
.search-dropdown__name {
  font-size: var(--fs-sm);
  color: var(--clr-text);
  font-weight: var(--fw-medium);
}
.search-dropdown__price {
  font-size: var(--fs-xs);
  color: var(--clr-text-secondary);
  font-family: var(--font-secondary);
}

/* Lightbox */
.lightbox {
  position: relative;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90dvh;
}
.lightbox__body {
  max-width: 80vw;
  max-height: 80dvh;
}
.lightbox__img {
  max-width: 100%;
  max-height: 80dvh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}
.lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  background-color: rgba(255,255,255,0.15);
  color: var(--clr-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background-color var(--t-base);
}
.lightbox__close:hover { background-color: rgba(255,255,255,0.25); }
.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255,255,255,0.15);
  color: var(--clr-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background-color var(--t-base);
  line-height: 1;
}
.lightbox__prev { left: -56px; }
.lightbox__next { right: -56px; }
.lightbox__prev:hover,
.lightbox__next:hover { background-color: rgba(255,255,255,0.28); }
.lightbox__caption {
  position: absolute;
  bottom: -36px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-secondary);
}

/* Tooltip */
.tooltip {
  position: absolute;
  background-color: var(--clr-gray-900);
  color: var(--clr-white);
  font-size: var(--fs-xs);
  font-family: var(--font-secondary);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-base);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-tooltip);
}
.tooltip.is-visible { opacity: 1; }

/* ── Responsive: stack on mobile ── */
@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
    min-height: unset;
  }
  .auth-panel {
    display: none; /* hidden on mobile — just show form */
  }
  .auth-form-side {
    min-height: 100dvh;
    padding: var(--sp-6) var(--sp-5);
  }
  .auth-form-wrap {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-fields-row {
    grid-template-columns: 1fr;
  }
  .otp-inputs {
    gap: var(--sp-2);
  }
}
