/* ============================================================================
   registro.css — Onboarding EURECA (estilo Duolingo, personalidad propia).
   Una pregunta por pantalla · barra de progreso · compañero · tarjetas grandes.
   Paleta: navy #0E2A47 + verde #16A34A. Objetivo: que registrarse se sienta
   un lujo, no un trámite.
   ============================================================================ */

.ob {
  --ob-navy: #0E2A47;
  --ob-green: #16A34A;
  --ob-green-700: #128A3E;
  --ob-ink: #16233A;
  --ob-muted: #5B677A;
  --ob-line: #E4E9F0;
  --ob-card: #FFFFFF;
  min-height: calc(100vh - var(--header-h));
  background:
    radial-gradient(1100px 520px at 82% -8%, rgba(22,163,74,.10), transparent 60%),
    radial-gradient(900px 480px at -6% 12%, rgba(14,42,71,.08), transparent 55%),
    #F7FAFC;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 var(--space-4) var(--space-8);
}

/* ---- Aviso del servidor (correo duplicado, fallo al crear) ---- */
.ob-alert {
  width: min(760px, 100%);
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem;
  margin-top: var(--space-4); padding: .8rem 1rem;
  background: #FBEAE7; border: 1.5px solid #F1B7AE; border-radius: 12px;
  color: #B23B2E; font-size: .9rem;
}
.ob-alert b { font-family: var(--font-display); }
.ob-alert span { color: #8C4A40; overflow-wrap: anywhere; }
.ob-alert__cta {
  margin-left: auto; padding: .45rem .9rem; border-radius: 999px;
  background: var(--ob-navy); color: #fff; font-weight: 700; font-size: .8rem;
  text-decoration: none; white-space: nowrap;
}

/* ---- Barra superior: volver + progreso ---- */
.ob-top { width: min(760px, 100%); display: flex; align-items: center; gap: var(--space-4); padding: var(--space-5) 0 var(--space-6); }
.ob-back {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1.5px solid var(--ob-line); background: #fff; color: var(--ob-ink);
  cursor: pointer; transition: background .15s, border-color .15s, transform .12s, opacity .2s;
}
.ob-back:hover { background: #F1F5FA; border-color: #C9D3E0; }
.ob-back:active { transform: scale(.94); }
.ob-back svg { width: 20px; height: 20px; }
.ob-back[hidden] { visibility: hidden; }
.ob-progress { flex: 1; height: 14px; border-radius: 999px; background: #E7ECF3; overflow: hidden; }
.ob-progress__fill {
  height: 100%; width: 14%; border-radius: 999px;
  background: linear-gradient(90deg, #22C55E, var(--ob-green));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  transition: width .45s cubic-bezier(.22,1,.36,1);
}
.ob-skip { flex: none; font-size: .84rem; font-weight: 600; color: var(--ob-muted); background: none; border: 0; cursor: pointer; padding: .3rem .2rem; }
.ob-skip:hover { color: var(--ob-ink); }

/* ---- Compañero + burbuja ---- */
.ob-say { width: min(760px, 100%); display: flex; align-items: flex-end; gap: var(--space-3); margin-bottom: var(--space-5); }
/* La estrella EURECA tal cual (sin círculo ni marco); el círculo queda solo
   para el fallback SVG si faltara la imagen. */
.ob-guide {
  flex: none; width: 88px; height: auto; object-fit: contain;
  background: transparent; border: 0; border-radius: 0;
  filter: drop-shadow(0 8px 18px rgba(14, 42, 71, .16));
}
.ob-guide--svg { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: #EAF6EE; border: 3px solid #fff; box-shadow: 0 8px 22px rgba(14,42,71,.14); color: var(--ob-green); }
.ob-guide--svg svg { width: 42px; height: 42px; }
.ob-bubble {
  position: relative; background: #fff; border: 1.5px solid var(--ob-line);
  border-radius: 16px; padding: .85rem 1.1rem; box-shadow: 0 6px 18px rgba(14,42,71,.07);
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; color: var(--ob-ink);
  max-width: 560px; text-wrap: balance;
}
.ob-bubble::before, .ob-bubble::after {
  content: ""; position: absolute; left: -9px; bottom: 16px;
  border: 9px solid transparent; border-right-color: var(--ob-line); border-left: 0;
}
.ob-bubble::after { left: -7px; border-right-color: #fff; }

/* ---- Pasos ---- */
.ob-steps { width: min(760px, 100%); position: relative; }
.ob-step { display: none; animation: obIn .34s cubic-bezier(.22,1,.36,1); }
.ob-step.is-active { display: block; }
@keyframes obIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---- Tarjetas de opción (grandes, con ícono) ---- */
.ob-grid { display: grid; gap: var(--space-3); }
.ob-grid--2 { grid-template-columns: 1fr 1fr; }
.ob-card {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left;
  padding: 1rem 1.1rem; background: var(--ob-card); border: 2px solid var(--ob-line);
  border-radius: 16px; cursor: pointer; position: relative;
  box-shadow: 0 1px 0 rgba(14,42,71,.04);
  transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
}
.ob-card:hover { border-color: #BFE6CD; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(14,42,71,.10); }
.ob-card:active { transform: translateY(0) scale(.995); }
.ob-card.is-sel { border-color: var(--ob-green); background: #F0FAF3; }
.ob-card__ic {
  flex: none; width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: #EEF3F8; color: var(--ob-navy);
}
.ob-card.is-sel .ob-card__ic { background: #DCF3E4; color: var(--ob-green-700); }
.ob-card__ic svg { width: 26px; height: 26px; }
.ob-card__body { flex: 1; min-width: 0; }
.ob-card__t { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--ob-ink); }
.ob-card__d { display: block; font-size: .84rem; color: var(--ob-muted); margin-top: 1px; }
.ob-card__badge {
  flex: none; align-self: flex-start; font-size: .64rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ob-green-700); background: #DCF3E4; padding: .18rem .5rem; border-radius: 999px;
}
.ob-card__check {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ob-green); color: #fff; opacity: 0; transform: scale(.6); transition: opacity .18s, transform .18s;
}
.ob-card.is-sel .ob-card__check { opacity: 1; transform: scale(1); }
.ob-card__check svg { width: 15px; height: 15px; }

/* ---- Paso de propuesta de valor (lista) ---- */
.ob-value { list-style: none; padding: 0; margin: 0 0 var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); }
.ob-value li { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) 0; border-bottom: 1px solid var(--ob-line); }
.ob-value li:last-child { border-bottom: 0; }
.ob-value__ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: #EAF6EE; color: var(--ob-green-700); }
.ob-value__ic svg { width: 24px; height: 24px; }
.ob-value__t { font-family: var(--font-display); font-weight: 700; color: var(--ob-ink); }
.ob-value__d { font-size: .9rem; color: var(--ob-muted); margin-top: 2px; }

/* ---- Campos (país, crear cuenta) ---- */
.ob-fields { display: flex; flex-direction: column; gap: var(--space-4); margin-bottom: var(--space-6); }
.ob-field label { display: block; font-weight: 700; font-size: .92rem; color: var(--ob-ink); margin-bottom: .4rem; }
.ob-field .ob-input, .ob-field select.ob-input {
  width: 100%; height: 52px; padding: 0 1rem; border: 2px solid var(--ob-line); border-radius: 13px;
  font-size: 1rem; color: var(--ob-ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.ob-field .ob-input:focus, .ob-field select.ob-input:focus {
  outline: none; border-color: var(--ob-green); box-shadow: 0 0 0 4px rgba(22,163,74,.14);
}
.ob-field.is-err .ob-input { border-color: #E0564A; }
.ob-field__err { display: none; margin-top: .35rem; font-size: .82rem; color: #B42318; }
.ob-field.is-err .ob-field__err { display: block; }
/* ---- HUÉRFANAS (2026-08-07, ronda 1 de limpieza) ----
   `_tools/css-huerfanos.php` las dio como no usadas y se comprobó a mano: ni el
   formulario ni su JS las pone en ningún elemento. Se COMENTAN, no se borran:
   si algo se ve raro en el registro, se descomenta y ya. Si en la próxima ronda
   sigue todo bien, se eliminan de verdad.
.ob-field__hint { margin-top: .35rem; font-size: .82rem; color: var(--ob-muted); }
.ob-field.is-err .ob-field__hint { display: none; }
   ---- fin huérfanas ---- */

/* Campo resuelto: borde verde discreto (refuerzo positivo, sin ruido). */
.ob-field.is-ok .ob-input { border-color: #8FD3AA; }

/* Palomita / reloj del correo mientras se comprueba contra el servidor.
   top: etiqueta (~26px) + mitad del campo (26px) − mitad de la insignia (11px):
   queda CENTRADA en el campo de 52px. */
.ob-field { position: relative; }
/* ---- HUÉRFANAS (2026-08-07, ronda 1) ----
   `.ob-chk` como CLASE no se usa: el marcador del correo se localiza por el
   atributo `[data-ob-chk]`, que es otra cosa. `.ob-field__cta` tampoco aparece
   en ningún marcado. Comentadas para la próxima ronda.
.ob-chk {
  position: absolute; right: .9rem; top: 2.6rem;
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: #E3F5EA; color: var(--ob-green-700);
  font-size: .78rem; font-weight: 800; line-height: 1;
}
.ob-field__cta {
  display: inline-block; margin-top: .5rem; padding: .5rem 1rem;
  border-radius: 999px; background: var(--ob-navy); color: #fff;
  font-size: .82rem; font-weight: 700; text-decoration: none;
}
.ob-field__cta[hidden] { display: none; }
   ---- fin huérfanas ---- */
/* Contraseña con ojo + fuerza */
.ob-pass { position: relative; }
.ob-pass .ob-input { padding-right: 3rem; }
.ob-eye { position: absolute; right: .5rem; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; background: none; color: var(--ob-muted); cursor: pointer; border-radius: 9px; }
.ob-eye:hover { background: #F1F5FA; color: var(--ob-ink); }
.ob-eye svg { width: 20px; height: 20px; }
.ob-meter { height: 6px; border-radius: 999px; background: #E7ECF3; margin-top: .5rem; overflow: hidden; }
.ob-meter__f { height: 100%; width: 0; border-radius: 999px; background: #E0564A; transition: width .25s, background .25s; }
.ob-meter__f.is-2 { background: #E8A13B; } .ob-meter__f.is-3 { background: #3BA55C; } .ob-meter__f.is-4 { background: var(--ob-green); }

/* ---- Pie de paso: botón principal ---- */
.ob-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; width: 100%; height: 56px;
  background: var(--ob-green); color: #fff; border: 0; border-radius: 14px; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(22,163,74,.32), inset 0 1px 0 rgba(255,255,255,.22);
  transition: background .15s, transform .12s, box-shadow .15s, opacity .2s;
}
.ob-cta:hover { background: var(--ob-green-700); transform: translateY(-1px); box-shadow: 0 12px 26px rgba(22,163,74,.42), inset 0 1px 0 rgba(255,255,255,.22); }
.ob-cta:active { transform: translateY(0) scale(.99); }
.ob-cta[disabled] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.ob-cta__arrow { transition: transform .18s; }
.ob-cta:hover .ob-cta__arrow { transform: translateX(3px); }
.ob-legal { margin-top: var(--space-3); text-align: center; font-size: .82rem; color: var(--ob-muted); }
.ob-legal a { color: var(--ob-green-700); font-weight: 600; }
.ob-alt { margin-top: var(--space-4); text-align: center; font-size: .92rem; color: var(--ob-muted); }
.ob-alt a { color: var(--ob-green-700); font-weight: 700; }
.ob-note { margin-top: var(--space-4); text-align: center; font-size: .78rem; color: #92A0B3; }

/* Título de paso (crear cuenta / país) */
.ob-h { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; color: var(--ob-navy); margin: 0 0 .3rem; }
.ob-sub { color: var(--ob-muted); margin: 0 0 var(--space-5); }

@media (max-width: 640px) {
  .ob-grid--2 { grid-template-columns: 1fr; }
  .ob-guide { width: 64px; height: auto; }
  .ob-guide--svg { width: 60px; height: 60px; }
  .ob-bubble { font-size: .95rem; }
  .ob-say { margin-bottom: var(--space-4); }
}

/* ---- Combobox de país con búsqueda (accesible) ---- */
.ob-combo { position: relative; }
.ob-combo__ic { position: absolute; left: .95rem; top: 16px; width: 20px; height: 20px; color: #8A97A8; pointer-events: none; }
.ob-combo__ic svg { width: 20px; height: 20px; }
.ob-combo__input { padding-left: 2.7rem; }
.ob-combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: .35rem; list-style: none;
  max-height: 280px; overflow-y: auto; background: #fff; border: 1.5px solid var(--ob-line);
  border-radius: 13px; box-shadow: 0 18px 44px rgba(14,42,71,.16);
}
.ob-combo__list[hidden] { display: none; }
.ob-combo__list li[role="option"] {
  padding: .6rem .8rem; border-radius: 9px; cursor: pointer; font-size: .96rem; color: var(--ob-ink);
}
.ob-combo__list li[role="option"]:hover,
.ob-combo__list li[role="option"].is-active { background: #F0FAF3; color: var(--ob-green-700); }
.ob-combo__none { padding: .7rem .8rem; color: var(--ob-muted); font-size: .9rem; }
.ob-combo__none[hidden] { display: none; }

/* ---- Fix: la lupa ya no pisa el texto (mayor especificidad que .ob-field .ob-input) ---- */
.ob-field .ob-combo__input { padding-left: 3rem; }
/* ---- Banderas dentro del listado de países ---- */
.ob-combo__list li[role="option"] { display: flex; align-items: center; gap: .7rem; }
.ob-flag { flex: none; width: 24px; height: 18px; border-radius: 3px; overflow: hidden; object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); background: #EEF2F7; }
/* Bandera del país elegido, a la izquierda del input (reemplaza la lupa al seleccionar) */
.ob-combo__flag { position: absolute; left: .85rem; top: 17px; width: 24px; height: 18px; border-radius: 3px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); display: none; }
.ob-combo.has-flag .ob-combo__ic { display: none; }
.ob-combo.has-flag .ob-combo__flag { display: block; }
.ob-combo.has-flag .ob-combo__input { padding-left: 3.1rem; }

/* FIX CRÍTICO: el flex de la opción (para las banderas) anulaba el atributo [hidden],
   por eso al filtrar las opciones seguían visibles. Esto le devuelve la prioridad a [hidden]. */
.ob-combo__list li[role="option"][hidden] { display: none !important; }

/* ---- Registro social: botón Google + divisor "o" ---- */
.ob-google {
  display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; height: 54px;
  background: #fff; color: #1F2937; border: 1.5px solid #DADCE0; border-radius: 14px; cursor: pointer;
  font-family: var(--font-display, inherit); font-weight: 700; font-size: 1rem;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.ob-google:hover { background: #F7F8FA; border-color: #C6C9CE; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.ob-google:active { transform: scale(.99); }
.ob-google svg { flex: none; }
.ob-google[disabled] { opacity: .6; cursor: default; }
.ob-or { display: flex; align-items: center; gap: .8rem; margin: 1.15rem 0; color: #8A97A8; font-size: .84rem; }
.ob-or::before, .ob-or::after { content: ""; flex: 1; height: 1px; background: var(--ob-line); }
