/* ── Pasapet PPMS — Business Registration Page ─────────────────── */
/* Matches Figma design: node 81:136 — "Registrá tu negocio" */

.reg-page {
  min-height: 100vh;
  background: #1a5dcb;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  /* clip avoids making position:fixed map modal attach to this box */
  overflow-x: clip;
  padding: 0 16px 40px;
  font-family: 'Ubuntu', sans-serif;
}

/* ---------- Step progress bar ---------- */
.reg-stepper {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  margin: 32px auto 0;
  width: 100%;
  max-width: 720px;
  justify-content: center;
}

.reg-stepper__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
}

/* connector line between dots */
.reg-stepper__item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 16px;
  left: calc(50% + 16px);
  width: calc(100% - 32px);
  height: 2px;
  background: rgba(255,255,255,.3);
}

.reg-stepper__item--active:not(:last-child)::after {
  background: rgba(255,255,255,.3);
}

.reg-stepper__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #cad4e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #1a5dcb;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.reg-stepper__item--active .reg-stepper__dot {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.reg-stepper__item--active-first .reg-stepper__dot {
  background: #1a5dcb;
  border: 2px solid #e6b800;
  color: #e6b800;
}

.reg-stepper__item--active-current .reg-stepper__dot {
  background: transparent;
  border: 2px solid #e6b800;
  color: #e6b800;
}

.reg-stepper__item--completed .reg-stepper__dot {
  background: #e6b800;
  border: none;
  color: transparent;
}

.reg-stepper__check {
  width: 20px;
  height: 20px;
  display: block;
  filter: brightness(0) saturate(100%) invert(17%) sepia(15%) saturate(1200%) hue-rotate(169deg) brightness(95%) contrast(90%);
}

.reg-stepper__item--completed:not(:last-child)::after {
  background: rgba(230, 184, 0, 0.85);
}

.reg-stepper__label {
  font-family: 'Ubuntu', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
}

.reg-stepper__item--active .reg-stepper__label {
  color: #fff;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.reg-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 24px;
}

h1.reg-hero__title,
.reg-hero__title {
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
  font-size: clamp(28px, 4vw, 48px);
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.1;
}

.reg-hero__subtitle {
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
  font-size: clamp(13px, 1.5vw, 16px);
  color: #e6b800;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ---------- Stage + card (Figma 56:79, 81:144 — blue page, white card, no circle) ---------- */
.reg-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  margin: 20px auto 0;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}

.reg-card {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 3px solid #cad4e6;
  border-radius: 32px;
  box-shadow: 0 4px 4px rgba(106, 116, 126, 0.25);
  width: 100%;
  max-width: 454px;
  padding: 28px 40px 32px;
  margin: 0;
  box-sizing: border-box;
}

.reg-card__top-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.reg-card__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cad4e6;
}

.reg-card__dot--active {
  background: #1a5dcb;
}

.reg-card__heading {
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
  font-size: 24px;
  color: #1a5dcb;
  margin: 0 0 14px;
}

.reg-card__divider {
  height: 2px;
  background: #1a5dcb;
  border: none;
  margin: 0 0 24px;
  border-radius: 2px;
}

/* ---------- Form fields ---------- */
.reg-field {
  margin-bottom: 18px;
}

.reg-field__label {
  display: block;
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: #3f5063;
  margin-bottom: 8px;
}

.reg-field__input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  /* BlueEdgeInputBox: 2px solid primaryLight, radius 30px, shadow */
  border: 2px solid #e1e7f2;
  border-radius: 30px;
  font-family: 'Ubuntu', sans-serif;
  font-size: 15px;
  color: #2a3c50;
  background: #fff;
  box-shadow: 0 4px 6px rgba(106, 116, 126, 0.25);
  box-sizing: border-box;
  transition: border-color .15s;
  outline: none;
}

.reg-field__input::placeholder {
  color: #66717a;
  font-style: italic;
}

.reg-field__input:focus {
  border-color: #1a5dcb;
  box-shadow: 0 4px 6px rgba(106, 116, 126, 0.25);
}

/* Password row (input + toggle) */
.reg-field__row {
  position: relative;
  display: flex;
  align-items: center;
}

.reg-field__row .reg-field__input {
  padding-right: 44px;
}

.reg-field__toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #66717a;
  padding: 4px;
  display: flex;
  align-items: center;
  font-size: 16px;
}

.reg-field__toggle:hover { color: #1a5dcb; }

.reg-field__error {
  color: #d32f2f;
  font-size: 0.8125rem;
  margin-top: 4px;
}

/* Position the shared password-toggle widget inside reg-field__row */
.reg-field__row .password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Flash alerts ---------- */
.reg-alert {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.reg-alert--danger { background: #fde8e8; border-color: #f5c6cb; color: #721c24; }
.reg-alert--success { background: #e6f4ea; border-color: #c3e6cb; color: #155724; }
.reg-alert--info { background: #e8f0fe; border-color: #c5d8fc; color: #1a3f8f; }
.reg-alert--warning { background: #fff8e1; border-color: #ffe082; color: #7a5f00; }

/* ---------- Submit button ---------- */
.reg-btn {
  display: block;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 30px;
  background: #1a5dcb;
  color: #fff;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity .15s;
  letter-spacing: .3px;
}

.reg-btn:hover { opacity: .88; }
.reg-btn:active { opacity: .78; }
.reg-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Footer link ---------- */
.reg-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 18px;
}

.reg-footer a {
  color: rgba(255,255,255,.85);
  font-size: 13px;
  text-decoration: none;
  font-family: 'Ubuntu', sans-serif;
}

.reg-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Success inline line ---------- */
.reg-success-line {
  font-size: 0.8125rem;
  color: #1a5dcb;
  margin-bottom: 12px;
  font-family: 'Ubuntu', sans-serif;
}

/* ---------- Card subtitle (verify email, etc.) ---------- */

/* When the block is empty (no subheading defined), hide the wrapping <p> */
.reg-card__sub--auto:empty {
  display: none;
}

.reg-card__sub {
  font-family: 'Ubuntu', sans-serif;
  font-size: 14px;
  color: #66717a;
  margin: 4px 0 20px;
  text-align: center;
  line-height: 1.4;
}

/* ---------- Verify-email logo badge ---------- */
.reg-card__logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.reg-card__logo-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #4c3d9e;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reg-card__logo-badge img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Centered heading variant for verify screens */
.reg-card__heading--center {
  text-align: center;
  color: #2d2d5e;
  font-size: 20px;
  margin-bottom: 6px;
}

/* Verify email — compact card matching Figma 81:135 */
.reg-card--verify .reg-card__logo-wrap {
  margin-bottom: 10px;
}

.reg-card--verify .reg-card__logo-badge {
  width: 52px;
  height: 52px;
}

.reg-card--verify .reg-card__logo-badge img {
  width: 32px;
  height: 32px;
}

.reg-card--verify .reg-card__sub {
  font-size: 13px;
  margin: 0 0 10px;
}

.reg-card--verify .reg-card__instructions {
  font-size: 12px;
  margin-bottom: 14px;
  line-height: 1.4;
}

.reg-card--verify .reg-card__instructions p {
  margin: 0 0 4px;
}

.reg-card--verify .reg-field {
  margin-bottom: 12px;
}

.reg-card--verify .reg-field__label {
  font-size: 14px;
  margin-bottom: 6px;
}

.reg-card--verify .reg-field__input {
  height: 44px;
  font-size: 18px;
}

.reg-card--verify .reg-btn {
  height: 44px;
  font-size: 15px;
  margin-top: 4px;
}

.reg-card--verify .reg-card__links {
  margin-top: 12px;
  gap: 4px;
}

.reg-card--verify .reg-card__link {
  font-size: 12px;
}

.reg-field__input--code {
  letter-spacing: 0.25em;
  text-align: center;
  font-size: 18px;
}

.reg-card__actions--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.reg-card__actions--stack .reg-btn {
  width: 100%;
  margin-top: 0;
}

/* Create account (Figma 56:79) */
.reg-card--account .reg-card__top-dots {
  margin-bottom: 12px;
}

.reg-card--account .reg-field {
  margin-bottom: 14px;
}

/* Business info — long form grows with page (Figma 81:144) */
.reg-card--business {
  padding-bottom: 36px;
}

.reg-card--business .reg-field {
  margin-bottom: 16px;
}

/* ---------- Card instructions text ---------- */
.reg-card__instructions {
  font-family: 'Ubuntu', sans-serif;
  font-size: 14px;
  color: #66717a;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ---------- Outline button variant ---------- */
.reg-btn--outline {
  background: #fff;
  color: #1a5dcb;
  border: 3px solid #1a5dcb;
}

.reg-btn--outline:hover { background: #f0f4ff; opacity: 1; }

/* ---------- Small card links ---------- */
.reg-card__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.reg-card__link {
  font-family: 'Ubuntu', sans-serif;
  font-size: 13px;
  color: #1a5dcb;
  text-decoration: none;
}

.reg-card__link:hover { text-decoration: underline; }

/* Label with secondary note */
.reg-field__label-note {
  font-family: 'Urbanist', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: #66717a;
}

/* Right-aligned action buttons (Figma: Continuar / Abrir mapa) */
.reg-card__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.reg-btn--inline {
  width: auto;
  min-width: 153px;
  height: 44px;
  padding: 0 32px;
  margin-top: 0;
}

/* Outline map button — right-aligned per Figma */
.reg-btn--map {
  display: block;
  margin-left: auto;
  margin-right: 0;
  width: auto;
  min-width: 153px;
  height: 44px;
  padding: 0 24px;
  border: 3px solid #1a5dcb;
  border-radius: 30px;
  background: #fff;
  color: #1a5dcb;
  font-family: 'Ubuntu', sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background .15s;
}

.reg-btn--map:hover { background: #f0f4ff; }

/* Flash messages above card */
.reg-flashes {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 520px;
  margin: 12px auto 0;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.reg-field .ic-box__hint {
  font-size: 0.8125rem;
  margin-top: 4px;
  display: none;
}

.reg-field .ic-box__hint[style*="display: block"],
.reg-field .ic-box__hint:not([hidden]) {
  display: block;
}

/* IC validation wrapper — strips box decoration; .reg-field__input carries the visual style */
.reg-ic-wrap {
  position: relative;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Relay IC validation states onto the sibling input */
.reg-ic-wrap.ic-box--valid .reg-field__input {
  border-color: #4caf50;
}
.reg-ic-wrap.ic-box--invalid .reg-field__input {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, .12);
}
.reg-ic-wrap.ic-box--pending .reg-field__input {
  border-color: #f0a500;
}

/* Email spinner sits inside the input */
.reg-ic-wrap .ic-box__suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* Password toggle inside ic-box wrapper */
.reg-ic-wrap .ic-box__suffix--toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  display: flex;
  align-items: center;
}

/* Input inside ic-wrap needs right padding so text doesn't overlap toggle */
.reg-ic-wrap .reg-field__input {
  padding-right: 44px;
}

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
  .reg-hero {
    margin-top: 16px;
  }

  .reg-hero__title {
    font-size: 26px;
  }

  .reg-hero__subtitle {
    font-size: 12px;
    max-width: 320px;
  }

  .reg-stage {
    padding: 0 12px;
  }

  .reg-card {
    padding: 24px 20px 28px;
    border-radius: 24px;
  }
  .reg-stepper__label { display: none; }
  .reg-stepper {
    gap: 0;
    max-width: 360px;
  }
}
