/* ================================================
   register.css — BarangayConnect
   Registration-specific multistep forms layout and progress steppers.

   WHAT IS IN HERE:
   · Horizontal step track wrapper and active state badges
   · Form page grids (Personal, Location, Emergency details)
   · Photo attachment preview box and file drop layouts

   WHAT IS NOT IN HERE:
   · Standard field elements overrides     → auth.css
   · Direct PSGC dropdown fetching         → location.js
   · Login grid dimensions                 → login.css
================================================ */
/* ================================================
   register.css — BarangayConnect
   Standalone register page styles. Import AFTER
   main.css, buttons.css, components.css.
   Does NOT depend on auth.css.

   SECTIONS:
     1. Split layout
     2. Left panel (logo, hero, features, signups)
     3. Right panel (form wrapper)
     4. Step indicator
     5. Register card + form
     6. File upload
     7. Actions + TOS
     8. Success screen
     9. Page transition
    10. Responsive
================================================ */


/* ================================================
   1. SPLIT LAYOUT
================================================ */

.register-page {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}


/* ================================================
   2. LEFT PANEL
================================================ */

.reg-left {
  width: 46%;
  min-height: 100vh;
  background: var(--green-dark);
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-2xl);
  position: relative;
  overflow: hidden;
}

/* Decorative blobs */
.reg-left::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: var(--overlay-white-05);
  top: -80px;
  right: -60px;
  pointer-events: none;
}

.reg-left::after {
  content: '';
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: var(--overlay-white-04);
  bottom: -120px;
  left: -100px;
  pointer-events: none;
}

/* ── Logo ─────────────────────────────────────── */

.reg-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 2;
  margin-bottom: var(--space-xl);
  text-decoration: none;
}

.reg-logo__img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.reg-logo__text {
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: var(--text-lg);
  color: var(--white);
  letter-spacing: -0.3px;
}

/* ── Badge pill ───────────────────────────────── */

.reg-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 6px 14px;
  background: var(--overlay-white-12);
  border: 1px solid var(--overlay-white-20);
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base-sm);
  color: var(--white);
  z-index: 2;
  margin-bottom: var(--space-lg);
}

.reg-badge__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.22);
  animation: badge-pulse 2.2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.22); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0.08); }
}

/* ── Hero ─────────────────────────────────────── */

.reg-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: var(--space-md);
  z-index: 2;
}

.reg-hero__heading {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--white);
  line-height: var(--lh-tight);
  letter-spacing: -0.5px;
  margin-bottom: var(--space-sm);
}

.reg-hero__accent { color: var(--orange); }

.reg-hero__sub {
  max-width: 360px;
  font-size: var(--text-base-sm);
  color: var(--overlay-white-70);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-lg);
}

/* ── Feature list ─────────────────────────────── */

.reg-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.reg-feature {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.reg-feature__icon {
  width: 32px;
  height: 32px;
  background: var(--overlay-white-12);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--orange);
}

.reg-feature__icon [data-lucide] { width: 18px; height: 18px; }

.reg-feature__title {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-base-sm);
  color: var(--white);
  margin-bottom: 2px;
}

.reg-feature__sub {
  font-size: var(--text-sm);
  color: var(--overlay-white-55);
  line-height: var(--lh-snug);
}

/* ── Live signups widget ──────────────────────── */

.reg-signups {
  background: var(--overlay-white-10);
  border: 1px solid var(--overlay-white-12);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  z-index: 2;
}

.reg-signups__header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  color: var(--overlay-white-55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.reg-signups__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(74,222,128,0.22);
  animation: location-pulse 2.2s ease-in-out infinite;
}

@keyframes location-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74,222,128,0.22); }
  50%       { box-shadow: 0 0 0 6px rgba(74,222,128,0.08); }
}

.reg-signup-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 7px 0;
  border-bottom: 1px solid var(--overlay-white-10);
}

.reg-signup-item:last-of-type { border-bottom: none; }

.reg-signup-item__avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: var(--text-xs);
  color: var(--white);
  flex-shrink: 0;
}

.reg-signup-item__name {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
  color: var(--white);
}

.reg-signup-item__sub {
  font-size: var(--text-xs);
  color: var(--overlay-white-55);
}

.reg-signup-item__check { margin-left: auto; color: #4ade80; }
.reg-signup-item__check [data-lucide] { width: 14px; height: 14px; }

.reg-signups__footer {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--overlay-white-10);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--overlay-white-55);
}

.reg-signups__avatars {
  display: flex;
}

.reg-signups__ava {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--green-dark);
  background: var(--overlay-white-20);
  margin-left: -6px;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: var(--fw-extrabold);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reg-signups__ava:first-child { margin-left: 0; }


/* ================================================
   3. RIGHT PANEL
================================================ */

.reg-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--off-white);
  overflow-y: auto;
}

.reg-right__inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  max-width: 560px;
  margin: 0 auto;
  width: 100%;
}

/* "Already have an account?" row */
.reg-signin {
  align-self: flex-end;
  font-size: var(--text-base-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-lg);
}

.reg-signin a {
  color: var(--orange);
  font-weight: var(--fw-bold);
}

/* Page title */
.reg-title {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--text-2xl);
  color: var(--text-dark);
  letter-spacing: -0.5px;
  margin-bottom: var(--space-md);
  align-self: flex-start;
}


/* ================================================
   4. STEP INDICATOR
================================================ */

/* Step indicator */
.step-indicator {
  display: flex;
  align-items: center;
  width: 100%;
  margin-bottom: var(--space-md);
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.step-item__circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: var(--text-base);
  transition: background var(--transition), color var(--transition);
}

.step-item.pending   .step-item__circle { background: var(--gray-200); color: var(--gray-400); }
.step-item.active    .step-item__circle,
.step-item.completed .step-item__circle { background: var(--green-dark); color: var(--white); }

.step-item__label {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-xs);
  white-space: nowrap;
}

.step-item.pending   .step-item__label { color: var(--gray-400); }
.step-item.active    .step-item__label { color: var(--green-dark); font-weight: var(--fw-bold); }
.step-item.completed .step-item__label { color: var(--green-dark); }

.step-connector {
  flex: 1;
  height: 2px;
  margin-bottom: 22px;
  background: var(--gray-200);
  transition: background var(--transition-slow);
}

.step-connector.active { background: var(--green-dark); }


/* ================================================
   5. REGISTER CARD + FORM
================================================ */

.register-card {
  width: 100%;
  padding: var(--space-lg) var(--space-xl);
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.register-card__section-title {
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: var(--text-lg);
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.register-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-md);
  gap: var(--space-md);
}

.register-actions--end { justify-content: flex-end; }


/* ================================================
   6. FILE UPLOAD
================================================ */

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-2xl) var(--space-xl);
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.upload-area:hover { border-color: var(--green-light); background: #f0faf4; }
.upload-area [data-lucide] { width: 28px; height: 28px; color: var(--gray-400); }
.upload-area__label { font-size: var(--text-base); font-weight: var(--fw-medium); color: var(--gray-500); text-align: center; }
.upload-area__hint  { font-size: var(--text-sm); color: var(--gray-400); }
.upload-area input[type="file"] { display: none; }

.upload-preview {
  display: none;
  max-width: 100%;
  max-height: 160px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}


/* ================================================
   7. ACTIONS + TOS
================================================ */

.tos-block {
  padding: var(--space-md);
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
}

.tos-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: var(--lh-relaxed);
  cursor: pointer;
}

.tos-label input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--green-dark);
}

.tos-label a { color: var(--green-dark); font-weight: var(--fw-semibold); }
.tos-label a:hover { text-decoration: underline; }


/* ================================================
   8. SUCCESS SCREEN
================================================ */

.register-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  text-align: center;
  padding: var(--space-2xl);
  flex: 1;
}

.register-success.show { display: flex; }

.register-success__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-dark);
}

.register-success__icon [data-lucide] { width: 30px; height: 30px; }

.register-success__title {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--text-2xl);
  color: var(--text-dark);
}

.register-success__sub {
  max-width: 360px;
  font-size: var(--text-base);
  color: var(--gray-500);
  line-height: var(--lh-loose);
}


/* ================================================
   9. PAGE TRANSITION
================================================ */

.page-transition { animation: fadeUp 0.4s ease both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ================================================
  10. RESPONSIVE
================================================ */

@media (max-width: 900px) {
  .register-page { flex-direction: column; }

  .reg-left {
    width: 100%;
    min-height: unset;
    padding: var(--space-xl) var(--space-lg) var(--space-lg);
  }

  /* Too cluttered at narrow widths */
  .reg-features,
  .reg-signups  { display: none; }

  .reg-right__inner { padding: var(--space-xl) var(--space-md); }
  .reg-signin { margin-bottom: var(--space-lg); }
}

@media (max-width: 520px) {
  .register-card { padding: var(--space-lg) var(--space-md); }

  .step-item__label { font-size: 0.65rem; }

  .form-grid-2 { grid-template-columns: 1fr; }

  .register-actions {
    flex-direction: column-reverse;
    gap: 0.5rem;
  }

  .register-actions .btn {
    width: 100%;
    justify-content: center;
  }
}