/* Register Page Styles */

.page-register {
  background: linear-gradient(135deg, var(--pal-purple) 0%, var(--pal-eggplant) 100%);
  min-height: 100vh;
}

.register-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.register-header {
  padding: 20px 0;
}

.register-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(950px, 92vw);
  margin: 0 auto;
}

.register-header .brand-logo {
  filter: brightness(0) invert(1);
}

.register-header .lang-toggle {
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.register-header .lang-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

/* Main content */
.register-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.register-container {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  padding: 40px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Progress bar */
.progress-bar {
  height: 4px;
  background: rgba(109, 40, 107, 0.15);
  border-radius: 2px;
  margin-bottom: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pal-purple), var(--pal-lilac));
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 25%;
}

.step-indicator {
  text-align: center;
  font-size: 13px;
  color: var(--pal-gray);
  margin-bottom: 24px;
  font-weight: 500;
}

/* Steps */
.register-step {
  display: none;
}

.register-step.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.register-step h1 {
  font-size: 28px;
  color: var(--pal-eggplant);
  margin: 0 0 8px;
  line-height: 1.2;
  text-align: center;
}

.register-subtitle {
  color: var(--pal-gray);
  text-align: center;
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.5;
}

/* Google Sign-In */
.google-signin-wrapper {
  margin-bottom: 24px;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  color: var(--pal-slate);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-google:hover {
  border-color: #bbb;
  background: #fafafa;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  gap: 16px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e0e0;
}

.divider span {
  font-size: 13px;
  color: var(--pal-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Form */
.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.register-form .field {
  margin-bottom: 0;
}

.register-form .field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--pal-slate);
  margin-bottom: 8px;
  margin-left: 4px;
}

.register-form .field input,
.register-form .field textarea {
  width: 100%;
  border: 2px solid #e8e8e8;
  background: #fff;
  color: var(--pal-slate);
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 16px;
  transition: all 0.2s ease;
}

.register-form .field input:focus,
.register-form .field textarea:focus {
  border-color: var(--pal-purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(109, 40, 107, 0.1);
}

.register-form .field input::placeholder,
.register-form .field textarea::placeholder {
  color: #aaa;
}

/* Password field */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--pal-gray);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--pal-slate);
}

/* Password requirements */
.password-requirements {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.requirement {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--pal-gray);
  transition: color 0.2s ease;
}

.requirement.valid {
  color: #22c55e;
}

.requirement.valid .req-icon {
  color: #22c55e;
}

.req-icon {
  font-size: 12px;
  width: 16px;
  text-align: center;
}

/* Submit button */
.btn-full {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.btn-full svg {
  transition: transform 0.2s ease;
}

.btn-full:hover svg {
  transform: translateX(4px);
}

.btn-full:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading spinner animation */
.btn-full.is-loading {
  pointer-events: none;
  position: relative;
}

.btn-full.is-loading .btn-text {
  opacity: 0;
}

.btn-full.is-loading .btn-spinner {
  display: flex;
}

.btn-spinner {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.btn-full.is-loading .spinner {
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
}

/* Google button loading state */
.btn-google.is-loading {
  pointer-events: none;
  position: relative;
}

.btn-google.is-loading .btn-text {
  opacity: 0;
}

.btn-google.is-loading .btn-spinner {
  display: flex;
}

.btn-google .btn-spinner {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  gap: 8px;
}

.btn-google.is-loading .spinner {
  border-color: rgba(109, 40, 107, 0.2);
  border-top-color: var(--pal-purple);
}

/* Login link */
.login-link {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--pal-gray);
}

.login-link a {
  color: var(--pal-purple);
  font-weight: 600;
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

/* Success step */
.success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--pal-purple), var(--pal-lilac));
  border-radius: 50%;
  color: #fff;
}

.register-success-msg {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

#step-5 .btn-primary {
  margin-top: 16px;
}

/* Footer */
.register-footer {
  padding: 24px 20px;
  text-align: center;
}

.register-footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.6;
}

.register-footer a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

.register-footer a:hover {
  color: #fff;
}

/* Secondary button for header */
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.above-fold .btn-secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.above-fold .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 640px) {
  .register-container {
    padding: 32px 24px;
    border-radius: 20px;
  }

  .register-step h1 {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .register-main {
    padding: 20px 16px;
  }
}

/* Hide step indicator on success */
#step-5.active ~ .step-indicator,
.register-step#step-5.active + .step-indicator {
  display: none;
}

/* When step 5 is active, hide progress */
body.step-5-active .progress-bar,
body.step-5-active .step-indicator {
  display: none;
}

