/* Registration wizard: the step indicator and its panels. */

/* Wide enough for the form and the column beside it. The form itself keeps its
   old measure — a 560px field is already at the limit of comfortable, and the
   extra width is spent on the reassurances, not on longer inputs. */
/* `main.register-page`, not `.register-page`: app.css sets main.narrow to 460px
   with an element in the selector, so a bare class here loses and the form
   column collapses to about 130px beside the aside. */
main.register-page { max-width: 900px; }

.register-layout {
  display: grid;
  /* A capped form column rather than 1fr: the fields do not get more usable as
     they get wider, and letting them eat the spare width left the card looking
     like a page and the aside like an afterthought. */
  grid-template-columns: minmax(0, 540px) 240px;
  justify-content: center;
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
}

/* The stepper belongs above the card and at its width. Left outside this
   column it spanned the whole page, so step three sat over the aside. */
.register-main { min-width: 0; }

/* Below this the two columns would be too narrow to be worth having. The
   reassurances follow the form rather than preceding it: they answer questions
   the fields raise, so they are useless above them. */
@media (max-width: 820px) {
  main.register-page { max-width: 520px; }
  .register-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------------- stepper */

.wiz-steps {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}

/* One line behind all three markers rather than a segment per step: the dots
   sit on top of it, so the track reads as continuous. */
.wiz-steps::before {
  content: '';
  position: absolute;
  top: 17px;
  left: 16%;
  right: 16%;
  height: 2px;
  background: var(--pink-line);
}

.wiz-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.wiz-step.is-reachable { cursor: pointer; }

.wiz-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--pink-line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  transition: background .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), box-shadow .2s var(--ease);
}

.wiz-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--muted);
  transition: color .2s var(--ease);
}

.wiz-step.is-current .wiz-dot {
  background: linear-gradient(135deg, var(--pink-soft), var(--pink));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(254, 81, 130, .34);
}

.wiz-step.is-current .wiz-label { color: var(--ink); }

.wiz-step.is-done .wiz-dot {
  background: var(--pink-wash);
  border-color: var(--pink-soft);
  color: var(--pink);
  /* The number is replaced by a tick, so a completed step reads as done at a
     glance rather than being told apart by colour alone. */
  font-size: 0;
}

.wiz-step.is-done .wiz-dot::after {
  content: '\2713';
  font-size: 14px;
}

.wiz-step.is-done .wiz-label { color: var(--ink-soft); }
.wiz-step.is-reachable:hover .wiz-dot { border-color: var(--pink); }

/* ---------------------------------------------------------------- panels */

.wiz-heading {
  margin: 0 0 16px;
  font-size: 16px;
  letter-spacing: -.01em;
}

.wiz-panel { animation: wiz-in .26s var(--ease) both; }

@keyframes wiz-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.field-optional { font-weight: 400; color: var(--muted); }

/* ---------------------------------------------------------------- review */

.wiz-review {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 1px;
  margin: 0 0 20px;
  padding: 0;
  border: 1px solid var(--pink-line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--pink-line);
}

.wiz-review dt,
.wiz-review dd {
  margin: 0;
  padding: 11px 14px;
  background: rgba(255, 255, 255, .92);
  font-size: 13.5px;
}

.wiz-review dt {
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.wiz-review dd {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.wiz-review dd.is-empty { color: var(--muted); font-style: italic; }

/* ---------------------------------------------------------------- nav */

.wiz-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

/* Back stays at its own width so Continue keeps the same footprint on every
   step — a primary button that resizes as you advance reads as a different
   button each time. */
.wiz-nav .btn { flex: 1 1 auto; }
.wiz-nav .btn.ghost { flex: 0 0 auto; }

.register-consent { margin-top: 4px; }
.register-footnote { text-align: center; margin-top: 18px; }

@media (max-width: 420px) {
  .wiz-label { font-size: 11px; }
  .wiz-steps::before { left: 18%; right: 18%; }
  /* Stacked, so the 1px grid gap that draws the table rules would land between
     a label and its own value. Borders on the value instead. */
  .wiz-review {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    background: rgba(255, 255, 255, .92);
  }
  .wiz-review dt { padding: 10px 14px 0; }
  .wiz-review dd { padding: 2px 14px 10px; border-bottom: 1px solid var(--pink-line); }
  .wiz-review dd:last-child { border-bottom: 0; }
}

/* ----------------------------------------------------------- reassurances */

.register-aside {
  display: grid;
  gap: 18px;
  padding: 20px 18px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.register-assurance {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.register-assurance-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff0f5, #ffe3ee);
  color: var(--pink);
}

.register-assurance-ico .sj-icon { width: 18px; height: 18px; }

.register-assurance strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.35;
}

.register-assurance p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}

/* The line under a step's heading, saying what the step is for. */
.wiz-sub {
  margin: -4px 0 18px;
  font-size: 13.5px;
  color: var(--muted);
}
