/* ==========================================================================
   Registration wizard
   Loaded on top of auth.css. Class names are the ones register.js works with.
   ========================================================================== */

.reg {
  width: 100%;
  max-width: 600px;
}

/* ---------- Progress ------------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 36px;
  counter-reset: none;
}
.steps li {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}
/* each step is a segment of one progress bar */
.steps li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  transition: background-color 0.3s var(--ease);
}
.steps li span {
  display: none;
}
.steps li.is-current {
  color: var(--text-primary);
}
.steps li.is-current::before {
  background: linear-gradient(to right, var(--primary) 50%, var(--primary-soft) 50%);
}
.steps li.is-done {
  color: var(--success-text);
}
.steps li.is-done::before {
  background: var(--success);
}

/* ---------- A step -------------------------------------------------------- */

.step h1 {
  font-size: clamp(1.6rem, 2.5vw, 1.95rem);
  letter-spacing: -0.03em;
}
.step h1:focus {
  outline: none;
}
.step__lede {
  margin: 10px 0 26px;
  color: var(--text-secondary);
}
.step__fine {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.83rem;
  line-height: 1.5;
}
.step__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 22px;
  font-size: 0.93rem;
}
.step__sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-strong);
}
.step.is-fresh {
  animation: stepin 0.35s var(--ease);
}
@keyframes stepin {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------- Where to send the code ---------------------------------------- */

.channels {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}
.channels [data-channels] {
  display: grid;
  gap: 10px;
}
.channel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.channel input {
  order: 3;
  margin: 0 0 0 auto;
}
.channel:hover {
  border-color: var(--primary);
}
.channel.is-selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}
.channel.is-off {
  background: var(--surface-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}
.channel.is-off:hover {
  border-color: var(--border-strong);
}
.channel__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
}
.channel.is-selected .channel__icon {
  background: var(--surface);
}
.channel.is-off .channel__icon {
  background: var(--border);
  color: var(--text-muted);
}
.channel__name {
  display: block;
  font-weight: 650;
}
.channel__dest {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.channel__badge {
  order: 2;
  margin-left: auto;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 650;
  white-space: nowrap;
}
.channel__badge + input {
  margin-left: 0;
}

/* ---------- One-time code ------------------------------------------------- */

.otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  max-width: 400px;
}
.otp__box {
  width: 100%;
  height: 62px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  font-size: 1.6rem;
  font-weight: 650;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.otp__box:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
.otp__box.is-filled {
  border-color: var(--primary);
  background: var(--primary-light);
}
.otp__box.is-wrong {
  border-color: var(--danger);
  background: var(--danger-light);
  animation: shake 0.3s;
}
@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.otp__timer {
  min-height: 1.5em;
  margin: 14px 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.otp__timer.is-over {
  color: var(--danger-text);
  font-weight: 600;
}

/* ---------- Industry match ------------------------------------------------ */

.match {
  margin: -4px 0 20px;
  padding: 14px 16px;
  background: var(--primary-light);
  border: 1px solid var(--primary-soft);
  border-radius: var(--radius-md);
  font-size: 0.94rem;
}
.match--ok {
  background: var(--success-light);
  border-color: #bdebd6;
}
.match--new {
  background: var(--surface-secondary);
  border-color: var(--border);
  color: var(--text-secondary);
}
.match__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.match__actions .btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.9rem;
  white-space: normal;
  text-align: left;
}

/* ---------- Roles --------------------------------------------------------- */

.roles {
  margin: 0;
  padding: 0;
  border: 0;
}
.roles [data-roles] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.rolecard {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.rolecard:hover {
  border-color: var(--primary);
}
.rolecard.is-selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}
.rolecard__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.rolecard__text b {
  font-size: 0.96rem;
}
.rolecard__text span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.45;
}
.rolecard__tag {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--warning-light);
  border: 1px solid #f4dc9b;
  color: var(--warning-text);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 650;
}
.roles__more {
  margin: 14px 0 22px;
  font-size: 0.93rem;
}

/* ---------- Review -------------------------------------------------------- */

.review {
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.review div {
  display: flex;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.review div:first-child {
  border-top: 0;
}
.review dt {
  flex: none;
  width: 76px;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.review dd {
  display: flex;
  flex: 1;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  font-weight: 600;
}
.review dd .textlink {
  flex: none;
  font-size: 0.88rem;
}
.preview {
  margin-bottom: 22px;
  padding: 4px 16px 16px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.preview__group h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 8px;
  font-family: var(--font-body);
  font-size: 0.87rem;
  font-weight: 650;
  letter-spacing: 0;
}
.preview__group ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.preview__group li {
  padding: 3px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 550;
}
.preview__note {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 0.84rem;
}
.step .agree {
  margin-bottom: 18px;
}

/* ---------- Done ---------------------------------------------------------- */

.step--done {
  text-align: center;
}
.done-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 12px auto 16px;
  border-radius: 50%;
  background: var(--success-light);
  color: var(--success);
  box-shadow: 0 0 0 10px rgba(18, 146, 94, 0.08);
}
.done-mark .icon {
  width: 34px;
  height: 34px;
  stroke-width: 2.4;
}
.done-date {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.usercode {
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--primary-light);
  color: var(--primary-active);
  white-space: nowrap;
}
.step--done .step__lede {
  margin-inline: auto;
  max-width: 44ch;
}

/* ---------- Summary card (the dark side) ---------------------------------- */

.slip {
  margin-top: 28px;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
  color: var(--text-primary);
  font-size: 0.92rem;
}
.slip__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.slip__head img {
  border-radius: 8px;
}
.slip__head div {
  display: grid;
  min-width: 0;
}
.slip__head b {
  font-family: var(--font-display);
  font-weight: 700;
}
.slip__head span,
.slip__head time {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.slip__head time {
  margin-left: auto;
  white-space: nowrap;
}
.slip__rows {
  padding: 6px 20px;
}
.slip__rows--later {
  border-top: 1px dashed var(--border-strong);
}
.slip__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-radius: 6px;
  transition: background-color 0.6s;
}
.slip__row dt {
  flex: none;
  color: var(--text-muted);
}
.slip__row dd {
  min-width: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}
.slip__row.is-empty dd {
  color: #a4a7c6;
  font-weight: 400;
}
.slip__row.is-fresh {
  background: var(--primary-light);
  box-shadow: 0 0 0 6px var(--primary-light);
  transition: none;
}
.slip__tag {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 99px;
  background: var(--success-light);
  color: var(--success-text);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 650;
}
.slip__total {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--surface-secondary);
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.slip__total span {
  color: var(--text-muted);
  font-weight: 500;
}

@media (max-width: 560px) {
  .steps {
    margin-bottom: 26px;
  }
  .steps li {
    font-size: 0;
  }
  .steps li.is-current {
    font-size: 0.84rem;
    white-space: nowrap;
  }
  .steps li.is-current:nth-child(n + 3) {
    direction: rtl;
  }
  .roles [data-roles] {
    grid-template-columns: minmax(0, 1fr);
  }
  .otp {
    gap: 7px;
  }
  .otp__box {
    height: 54px;
    font-size: 1.35rem;
  }
  .field-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}
