/* Multi-step registration wizard */

.auth-page--register-hub .auth-card--wide {
  max-width: 720px;
}

.reg-wizard {
  margin-top: 0.25rem;
}

.reg-wizard__progress {
  margin-bottom: 1.25rem;
}

.reg-wizard__progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reg-wizard__progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.reg-wizard__progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.reg-wizard__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 1rem;
  line-height: 1.25;
}

.reg-wizard__viewport {
  min-height: 200px;
  position: relative;
}

.reg-wizard-step--active {
  animation: regWizardSlideIn 0.35s ease;
}

@keyframes regWizardSlideIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reg-wizard-step.reg-wizard-step--leave.reg-wizard-step--active {
  animation: regWizardSlideBack 0.35s ease;
}

@keyframes regWizardSlideBack {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Step 1 — type cards (legacy) */
.reg-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.reg-type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  font-family: inherit;
}

.reg-type-card:hover {
  border-color: #86efac;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.1);
  transform: translateY(-1px);
}

.reg-type-card--active {
  border-color: #16a34a;
  background: linear-gradient(180deg, #f0fdf4, #fff);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.12);
}

.reg-type-card--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.reg-type-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  background: #ecfdf5;
  color: #15803d;
}

.reg-type-card__label {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.reg-type-card__desc {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
  margin: 0;
}

.reg-wizard__type-hint {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0 0 0.5rem;
}

/* Hide legacy hub controls */
.auth-page--register-hub #authRegHeading,
.auth-page--register-hub #authRegSub,
.auth-page--register-hub > .auth-field--full:first-of-type {
  display: none;
}

.auth-reg-panels .auth-form--register > .auth-section-label,
.auth-reg-panels .auth-form--register > .auth-btn--primary[type="submit"],
.auth-reg-panels .auth-form--register #submit-btn,
.auth-reg-panels .auth-form--register #lrSubmitBtn {
  display: none !important;
}

.reg-wizard-step .auth-section-label {
  margin-top: 0;
}

/* Map */
.reg-wizard-map-wrap {
  margin-top: 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  height: 220px;
}

.reg-wizard-map-wrap .reg-wizard-map {
  width: 100%;
  height: 100%;
}

.reg-wizard-map-hint {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0.35rem 0 0;
}

/* Hours grid */
.reg-wizard-hours-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.reg-wizard-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.reg-wizard-day {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
}

.reg-wizard-day:has(input:checked) {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.reg-wizard-day input {
  accent-color: #16a34a;
}

.reg-wizard-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
}

.reg-wizard-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: #374151;
}

/* Terms */
.reg-wizard-terms {
  display: grid;
  gap: 0.65rem;
}

.reg-wizard-terms__doc {
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.5;
}

.reg-wizard-terms__doc h4 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
}

/* Review */
.reg-wizard-review__intro {
  font-size: 0.88rem;
  color: #64748b;
  margin: 0 0 1rem;
}

.reg-wizard-review__block {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.reg-wizard-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.reg-wizard-review__head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.reg-wizard-review__edit {
  border: 0;
  background: #ecfdf5;
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 8px;
  cursor: pointer;
}

.reg-wizard-review__list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.reg-wizard-review__list > div {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 0.5rem;
  font-size: 0.82rem;
}

.reg-wizard-review__list dt {
  margin: 0;
  font-weight: 700;
  color: #64748b;
}

.reg-wizard-review__list dd {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

/* Nav buttons — only one primary action visible at a time */
.reg-wizard__nav {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.reg-wizard__nav-back {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 96px;
  max-width: 38%;
  padding-left: 1rem;
  padding-right: 1rem;
}

.reg-wizard__nav-primary {
  flex: 1 1 auto;
  min-width: 0;
}

.reg-wizard__nav-primary .auth-btn {
  width: 100%;
}

.reg-wizard__nav .auth-btn[hidden] {
  display: none !important;
}

/* Wizard forms: always single-column — prevents scattered password rows on mobile */
.reg-wizard .auth-form-grid,
.reg-wizard .auth-form-grid--2,
.reg-wizard-step .auth-form-grid,
.reg-wizard-step .auth-form-grid--2 {
  grid-template-columns: 1fr !important;
  row-gap: 1rem;
}

.reg-wizard-step .auth-field,
.reg-wizard .auth-form-grid > .auth-field {
  grid-column: 1 / -1 !important;
  width: 100%;
  min-width: 0;
}

.reg-wizard-step .auth-input-wrap {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Phone row — keep prefix + input on one line without overflow */
.reg-wizard .auth-input-wrap--phone {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  overflow: hidden;
}

.reg-wizard .auth-input-wrap--phone .auth-input-wrap__prefix {
  flex: 0 0 auto;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  max-width: 42%;
}

.reg-wizard .auth-input-wrap--phone input {
  flex: 1 1 auto;
  min-width: 0;
  width: 0;
}

/* Password rows — full width, aligned toggle */
.reg-wizard .auth-input-wrap:has(.auth-input-wrap__toggle) {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.reg-wizard .auth-input-wrap:has(.auth-input-wrap__toggle) input {
  flex: 1 1 auto;
  min-width: 0;
}

.reg-wizard-field--error,
.reg-wizard-field--error:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.reg-wizard .auth-input-wrap:has(.reg-wizard-field--error) {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.reg-wizard-error {
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 600;
  margin: 0.25rem 0 0;
}

.reg-wizard-admin-note {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 0.86rem;
  color: #166534;
  line-height: 1.5;
}

.reg-wizard-admin-note strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

@media (max-width: 600px) {
  .reg-type-grid {
    grid-template-columns: 1fr;
  }

  .reg-wizard-hours-grid {
    grid-template-columns: 1fr;
  }

  .reg-wizard-review__list > div {
    grid-template-columns: 1fr;
  }

  .reg-wizard__title {
    font-size: 1.2rem;
  }

  .reg-wizard__nav {
    flex-direction: column-reverse;
    gap: 0.55rem;
  }

  .reg-wizard__nav-back,
  .reg-wizard__nav-primary,
  .reg-wizard__nav-primary .auth-btn {
    width: 100% !important;
    max-width: none;
  }

  .reg-wizard .auth-input-wrap--phone .auth-input-wrap__prefix {
    font-size: 0.7rem;
    padding: 0 0.45rem;
  }
}
