/* Register Page Styles */

/* Logo positioning */
.register-logo {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 10;
}

.register-logo img {
  height: 32px;
}

@media (max-width: 767px) {
  .register-logo {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
  }

  .register-logo img {
    height: 28px;
  }
}

/* Main container */
.custom-bg {
  background: linear-gradient(135deg, #f8f5ff 0%, #ffffff 100%);
  min-height: 100vh;
}

.auth-step {
  width: 100%;
  max-width: 460px;
}

/* Form container */
.login-form {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2.5rem 2rem;
  max-width: 460px;
  box-shadow: 0 4px 20px rgba(109, 40, 217, 0.08);
  margin: 0 auto;
}

@media (max-width: 767px) {
  .auth-step {
    max-width: 100%;
  }

  .login-form {
    padding: 2rem 1.5rem;
    box-shadow: none;
    background: transparent;
  }

  .btn-signin {
    padding-left: 0;
    padding-right: 0;
  }
}

.form-title {
  font-size: 24px;
  font-weight: 600;
  line-height: 90%;
  color: #434343;
  margin: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Form controls */
.form-floating {
  position: relative;
  margin-bottom: 1rem;
}

.form-floating > .form-control {
  height: 3.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem 0.75rem;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.form-floating > .form-control:focus {
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
  outline: none;
}

.form-floating > label {
  padding: 1rem 0.75rem;
  color: #718096;
  font-size: 0.9375rem;
}

.form-control:focus ~ label,
.form-control:not(:placeholder-shown) ~ label {
  opacity: 0.65;
  transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Password toggle */
.toggle-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  z-index: 3;
}

.toggle-btn img {
  height: 20px;
  width: 20px;
}

/* Field info tooltips */
.field-info-btn {
  color: #6c757d;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.field-info-btn:hover {
  color: #6d28d9;
}

.field-info-panel {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  width: max-content;
  max-width: 280px;
  padding: 0.625rem 0.875rem;
  background: #2d3748;
  color: #ffffff;
  border-radius: 0.5rem;
  line-height: 1.5;
  font-size: 0.8125rem;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tooltip arrow */
.field-info-panel::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 1rem;
  border: 6px solid transparent;
  border-top-color: #2d3748;
}

/* Alpine transition classes */
.tooltip-enter {
  transition: opacity 200ms ease, transform 200ms ease;
}
.tooltip-enter-start {
  opacity: 0;
  transform: translateY(-4px);
}
.tooltip-enter-end {
  opacity: 1;
  transform: translateY(0);
}
.tooltip-leave {
  transition: opacity 150ms ease, transform 150ms ease;
}
.tooltip-leave-start {
  opacity: 1;
  transform: translateY(0);
}
.tooltip-leave-end {
  opacity: 0;
  transform: translateY(-4px);
}

/* Hover behavior for desktop - shows tooltip on field hover */
@media (hover: hover) and (pointer: fine) {
  .form-floating.position-relative:hover .field-info-panel {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
    animation: tooltipFadeIn 200ms ease;
  }
}

@keyframes tooltipFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Password requirements */
.pw-requirements {
  padding: 0.75rem 1rem;
  background: #f7fafc;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.pw-requirements li {
  padding: 0.25rem 0;
  color: #718096;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.pw-req-met {
  color: #10b981 !important;
}

.pw-req-unmet {
  color: #cbd5e0 !important;
}

.text-purple {
  color: #6d28d9 !important;
}

/* Referral code section - more prominent */
.referral-section {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1.5px solid #e9d5ff;
  border-radius: 0.875rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.referral-section:hover {
  border-color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.1);
}

.referral-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  padding: 0;
  color: #6d28d9;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.referral-toggle:hover {
  gap: 0.625rem;
}

.referral-toggle i {
  font-size: 1.125rem;
  transition: transform 0.2s ease;
}

.referral-toggle[aria-expanded="true"] i {
  transform: rotate(90deg);
}

/* Buttons */
.btn-submit {
  display: inline-block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: #6d28d9;
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  font-weight: light;
  font-size: 1rem;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn-submit:hover:not(:disabled) {
  background: #5b21b6;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
  text-decoration: none;
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Social buttons */
.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-social:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.btn-social img {
  height: 20px;
  width: 20px;
}

/* Footer links */
.btn-signin {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: none;
  border: none;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  transition: gap 0.2s ease;
  border-radius: 0.5rem;
}

.btn-signin:hover {
  gap: 0.625rem;
  background: #f7fafc;
}

.btn-signin img {
  height: 14px;
  width: 14px;
}

/* Back button (for step 2) */
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #718096;
  text-decoration: none;
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.btn-back:hover {
  gap: 0.375rem;
  color: #4a5568;
}

.btn-back img {
  height: 16px;
  width: 16px;
}

/* OTP inputs */
.otp-inputs {
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.otp {
  flex: 1;
  min-width: 0;
  height: 3.5rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 0.75rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a202c;
  transition: all 0.2s ease;
}

.otp:focus {
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
  outline: none;
}

/* Loader overlay */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── Progress stepper ── */
.reg-stepper-wrap {
  max-width: 460px;
  padding: 2rem;
}

.reg-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  width: 100%;
}

.reg-step-dot {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  flex-shrink: 0;
  background: #e9d5ff;
  color: #6d28d9;
  border: 2px solid #e9d5ff;
  transition: all 0.25s ease;
}

.reg-step-dot.current {
  background: #6d28d9;
  color: #fff;
  border-color: #6d28d9;
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.2);
}

.reg-step-dot.done {
  background: #6d28d9;
  color: #fff;
  border-color: #6d28d9;
}

.reg-step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.reg-step-label {
  font-size: 0.75rem;
  white-space: nowrap;
}

.reg-step-line {
  flex: 1;
  height: 2px;
  background: #e9d5ff;
  margin-top: 1rem; /* vertically centres the line with the dots */
  transition: background 0.25s ease;
}

.reg-step-line.done {
  background: #6d28d9;
}

/* form-check tweak */
.form-check-input:checked {
  background-color: #6d28d9;
  border-color: #6d28d9;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .otp {
    height: 3rem;
    font-size: 1.25rem;
  }

  .otp-inputs {
    gap: 0.375rem;
  }
}

/* ── KYC prompt (step 5) ── */
.kyc-prompt {
  background: #f5f3ff;
  border: 1px solid #ede9fe;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  text-align: left;
}

.kyc-prompt-title {
  font-size: 0.9375rem;
  color: #4c1d95;
}
