/* =========================================================
   RGPD — estilos específicos del flujo de actualización de datos
   ========================================================= */

/* Secure badge en la cabecera */
.secure-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--mo-success);
  background-color: var(--mo-success-soft);
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

/* =========================================================
   Segmented control (elegir email/teléfono en paso 1)
   ========================================================= */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.25rem;
  background-color: var(--mo-bg-grain);
  border-radius: 14px;
  margin-bottom: 1.25rem;
}
.segmented__btn {
  background: transparent;
  border: none;
  color: var(--mo-muted);
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.segmented__btn:hover { color: var(--mo-ink); }
.segmented__btn.is-active {
  background-color: var(--mo-surface);
  color: var(--mo-ink);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 0 rgba(0,0,0,0.04);
}

/* =========================================================
   Input de texto grande/formulario
   ========================================================= */
.form-field {
  margin-bottom: 1rem;
}
.form-field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--mo-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.form-field__control {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1.5px solid var(--mo-border);
  background-color: var(--mo-surface);
  color: var(--mo-ink);
  font-size: 16px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.18s ease;
}
.form-field__control:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(240, 27, 106, 0.2);
  border-color: var(--mo-accent);
}
.form-field__control.is-invalid {
  border-color: var(--mo-warn);
  box-shadow: 0 0 0 3px rgba(178, 60, 30, 0.12);
}
.form-field__hint {
  font-size: 12px;
  color: var(--mo-muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}
.form-field__error {
  font-size: 12px;
  color: var(--mo-warn);
  margin-top: 0.35rem;
  line-height: 1.4;
  display: none;
}
.form-field.is-error .form-field__error { display: block; }
.form-field.is-error .form-field__hint  { display: none; }

/* =========================================================
   OTP input: 6 casillas separadas
   ========================================================= */
.otp-group {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin: 1rem 0;
}
.otp-group__slot {
  width: 44px;
  height: 52px;
  border-radius: 10px;
  border: 1.5px solid var(--mo-border);
  background-color: var(--mo-surface);
  color: var(--mo-ink);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  transition: all 0.18s ease;
  caret-color: var(--mo-accent);
}
.otp-group__slot:focus-visible {
  outline: none;
  border-color: var(--mo-accent);
  box-shadow: 0 0 0 3px rgba(240, 27, 106, 0.2);
}
.otp-group__slot.is-filled {
  border-color: var(--mo-ink);
  background-color: var(--mo-surface);
}
.otp-group.is-error .otp-group__slot {
  border-color: var(--mo-warn);
  animation: shake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}
@keyframes shake {
  10%, 90%  { transform: translateX(-1px); }
  20%, 80%  { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60%  { transform: translateX(4px); }
}

@media (max-width: 380px) {
  .otp-group__slot { width: 40px; height: 48px; font-size: 20px; }
}

/* =========================================================
   Resend link (reenviar OTP)
   ========================================================= */
.resend-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--mo-accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.18s ease;
}
.resend-link:hover:not(:disabled) { color: var(--mo-accent-hover); }
.resend-link:disabled {
  color: var(--mo-muted);
  cursor: not-allowed;
  text-decoration: none;
}

/* =========================================================
   Data row (email actual / teléfono actual en el paso 3)
   ========================================================= */
.data-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background-color: var(--mo-bg-grain);
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.data-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background-color: var(--mo-surface);
  color: var(--mo-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.data-row__label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mo-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}
.data-row__value {
  font-size: 15px;
  font-weight: 600;
  color: var(--mo-ink);
  line-height: 1.2;
  margin-top: 0.25rem;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-weight: 500;
}

/* =========================================================
   Check card (opción de qué actualizar, paso 3)
   ========================================================= */
.check-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--mo-surface);
  border: 1.5px solid var(--mo-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  text-align: left;
  user-select: none;
}
.check-card:hover { border-color: var(--mo-ink); }
.check-card.is-checked {
  border-color: var(--mo-accent);
  background-color: var(--mo-accent-soft);
}
.check-card__box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--mo-border);
  background-color: var(--mo-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.18s ease;
}
.check-card.is-checked .check-card__box {
  background-color: var(--mo-accent);
  border-color: var(--mo-accent);
  color: #fff;
}
.check-card__title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--mo-ink);
  line-height: 1.2;
  margin: 0;
}
.check-card__caption {
  font-size: 12px;
  color: var(--mo-muted);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

/* =========================================================
   Consent box (casilla de consentimiento RGPD)
   ========================================================= */
.consent-box {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem;
  background-color: var(--mo-bg-grain);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  margin-top: 0.5rem;
}
.consent-box__box {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--mo-muted);
  background-color: var(--mo-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.18s ease;
  color: #fff;
}
.consent-box.is-checked .consent-box__box {
  background-color: var(--mo-ink);
  border-color: var(--mo-ink);
}
.consent-box__text {
  font-size: 12.5px;
  color: var(--mo-ink-soft);
  line-height: 1.5;
  margin: 0;
}
.consent-box__text a {
  color: var(--mo-ink);
  text-decoration: underline;
}

/* =========================================================
   Captcha placeholder (solo visual)
   ========================================================= */
.captcha-placeholder {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  background-color: var(--mo-bg-grain);
  border: 1px dashed var(--mo-border);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.captcha-placeholder__box {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 2px solid var(--mo-border);
  background-color: var(--mo-surface);
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  color: #fff;
}
.captcha-placeholder.is-checked .captcha-placeholder__box {
  background-color: var(--mo-success);
  border-color: var(--mo-success);
}
.captcha-placeholder__text {
  font-size: 13px;
  color: var(--mo-ink-soft);
  flex-grow: 1;
  cursor: pointer;
}
.captcha-placeholder__brand {
  font-size: 10px;
  color: var(--mo-muted);
  opacity: 0.7;
  text-align: right;
}

/* =========================================================
   OTP destination pill (ej: "Código enviado a j***z@gmail.com")
   ========================================================= */
.otp-destination {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background-color: var(--mo-bg-grain);
  border-radius: 999px;
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--mo-ink);
}

/* =========================================================
   Reference code box (mostrar ID de trazabilidad en éxito)
   ========================================================= */
.reference-box {
  background-color: var(--mo-bg-grain);
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
  margin: 1rem 0;
}
.reference-box__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mo-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.reference-box__value {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--mo-ink);
  margin: 0.4rem 0 0;
  letter-spacing: 0.02em;
}

/* =========================================================
   Summary list (cambios aplicados, en éxito)
   ========================================================= */
.change-summary {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 1rem 0;
}
.change-summary__row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem;
  background-color: var(--mo-surface);
  border: 1px solid var(--mo-border);
  border-radius: 10px;
}
.change-summary__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: var(--mo-success-soft);
  color: var(--mo-success);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.change-summary__content {
  min-width: 0;
  flex-grow: 1;
}
.change-summary__field {
  font-size: 11px;
  font-weight: 600;
  color: var(--mo-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.change-summary__transition {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.15rem;
}
.change-summary__old {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 12px;
  color: var(--mo-muted);
  text-decoration: line-through;
}
.change-summary__new {
  font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--mo-ink);
}
.change-summary__arrow { color: var(--mo-muted); }

/* =========================================================
   Timer (cooldown y cuenta atrás de expiración)
   ========================================================= */
.timer-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background-color: var(--mo-bg-grain);
  font-size: 11.5px;
  color: var(--mo-muted);
  font-variant-numeric: tabular-nums;
}

/* =========================================================
   Alert inline (errores / éxitos dentro del wizard)
   ========================================================= */
.inline-alert {
  display: flex;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  margin-top: 0.75rem;
}
.inline-alert--warn {
  background-color: var(--mo-warn-soft);
  color: var(--mo-warn);
}
.inline-alert--info {
  background-color: var(--mo-accent-soft);
  color: var(--mo-accent);
}
.inline-alert__icon { flex-shrink: 0; margin-top: 1px; }

/* =========================================================
   Disclaimer (texto legal pequeño dentro de pasos)
   ========================================================= */
.disclaimer-text {
  font-size: 11.5px;
  color: var(--mo-muted);
  line-height: 1.5;
  margin: 0.75rem 0 0;
  text-align: center;
}
.disclaimer-text a {
  color: var(--mo-ink-soft);
  text-decoration: underline;
}

/* =========================================================
   Stepper específico: versión compacta con más de 3 pasos
   ========================================================= */
.stepper--compact .stepper__step { gap: 0.35rem; }
.stepper--compact .stepper__circle {
  width: 22px;
  height: 22px;
  font-size: 10.5px;
}
.stepper--compact .stepper__label { display: none; }
@media (min-width: 420px) {
  .stepper--compact .stepper__label { display: inline; font-size: 11px; }
}
