/* ============================================================================
   CHANGUITO IA — onboarding.css
   Lo específico del wizard de onboarding (mockup designsystem/01 Onboarding).
   Las clases base (botones, chips, tarjetas, sliders, sheets) viven en app.css;
   acá va solo la anatomía propia de estas pantallas.
   ========================================================================== */

/* ---------- Contenedor del wizard ---------- */
.onb {
  display: flex; flex-direction: column;
  min-height: 100dvh;
}

/* transición slide entre pasos (adelante / atrás) */
@keyframes onb-der {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes onb-izq {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}
.onb-anim-der { animation: onb-der .25s ease both; }
.onb-anim-izq { animation: onb-izq .25s ease both; }

/* ---------- Header: volver + barra de progreso + n/5 ---------- */
.onb-header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 0 0;
}
.onb-progreso { display: flex; gap: 6px; flex: 1; }
.onb-progreso span {
  flex: 1; height: 4px; border-radius: var(--r-pildora);
  background: var(--linea);
}
.onb-progreso span.hecho { background: var(--yerba-600); }
.onb-paso-num { font: 600 12px ui-monospace, monospace; color: var(--tinta-400); }

/* ---------- Títulos y subtítulos del wizard ---------- */
.onb-titulo {
  font-family: var(--f-titulos); font-weight: 800; font-size: 27px;
  letter-spacing: -.02em; line-height: 1.2; color: var(--tinta-900);
  margin: 24px 0 0;
}
.onb-titulo.chico { font-size: 24px; line-height: 1.25; margin-top: 20px; }
.onb-titulo.centrado { font-size: 26px; line-height: 1.25; text-align: center; }
.onb-sub { font-size: 15px; color: var(--tinta-600); margin: 8px 0 0; }

/* cuerpo y footer de cada paso (footer pegado abajo, CTA pulgar-first) */
.onb-cuerpo { display: flex; flex-direction: column; gap: 10px; padding: 20px 0 0; }
.onb-cards  { display: flex; flex-direction: column; gap: 14px; padding: 18px 0 0; }
.onb-footer {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px 0 calc(28px + env(safe-area-inset-bottom, 0px));
}
.onb-nota { text-align: center; font-size: 13px; color: var(--tinta-400); }
/* link discreto "Ya tengo cuenta" (target 44px igual) */
.onb-link {
  background: none; border: none; cursor: pointer;
  min-height: 44px; width: 100%;
  font-family: var(--f-titulos); font-weight: 700; font-size: 13px;
  color: var(--yerba-600);
}

/* ---------- A0 Bienvenida ---------- */
.onb-hero {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 32px 16px; text-align: center;
}
.onb-logo {
  width: 96px; height: 96px; border-radius: 28px;
  background: var(--logo-fondo); position: relative;
  display: flex; align-items: center; justify-content: center;
}
.onb-logo .logo-rombo { top: 10px; right: 10px; width: 10px; height: 10px; }
.onb-wordmark {
  font-family: var(--f-titulos); font-weight: 800; font-size: 30px;
  letter-spacing: -.02em; margin-top: 24px; color: var(--tinta-900);
}
.onb-wordmark span { color: var(--yerba-600); }
.onb-frase {
  font-family: var(--f-titulos); font-weight: 700; font-size: 23px;
  letter-spacing: -.01em; line-height: 1.3; margin-top: 28px;
}
.onb-frase-sub { font-size: 17px; color: var(--tinta-600); margin-top: 10px; }
.onb-checks {
  display: flex; flex-direction: column; gap: 10px;
  margin-top: 32px; font-size: 14.5px; color: var(--tinta-600); text-align: left;
}
.onb-checks > div { display: flex; gap: 10px; align-items: center; }
.onb-checks .tic { color: var(--yerba-600); font-weight: 700; }

/* ---------- A1 Tu familia ---------- */
.onb-miembro {
  background: var(--superficie); border: 1px solid var(--linea);
  border-radius: var(--r-card); padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.onb-miembro-av {
  width: 48px; height: 48px; border-radius: 50%; background: var(--mate-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; flex-shrink: 0;
}
.onb-miembro-datos { flex: 1; min-width: 0; }
.onb-miembro-nombre { font-family: var(--f-titulos); font-weight: 600; font-size: 16px; }
.onb-miembro-rango { font-size: 13px; color: var(--tinta-600); }
.onb-miembro-mas {
  width: 44px; height: 44px; border-radius: var(--r-pildora); border: none;
  background: transparent; font-size: 18px; color: var(--tinta-400);
  cursor: pointer; flex-shrink: 0;
}
.onb-miembro-mas:hover { background: var(--hundido); }
/* "+ Agregar a alguien": card dashed accionable */
.onb-mas {
  width: 100%; background: transparent;
  border: 2px dashed #C9C2AE; border-radius: var(--r-card);
  padding: 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-titulos); font-weight: 700; font-size: 15px;
  color: var(--yerba-600); cursor: pointer;
}
.onb-mas:hover { background: var(--yerba-50); }

/* estado vacío A1c */
.onb-vacio {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  padding: 24px 16px; text-align: center;
}
.onb-vacio-circulo {
  width: 120px; height: 120px; border-radius: 50%;
  background: repeating-linear-gradient(45deg, #F3EEE1 0 8px, #EFE9DA 8px 16px);
  display: flex; align-items: center; justify-content: center; font-size: 48px;
}
.onb-vacio-titulo { font-family: var(--f-titulos); font-weight: 700; font-size: 18px; }
.onb-vacio-texto { font-size: 15px; color: var(--tinta-600); line-height: 1.5; max-width: 280px; }

/* ---------- Sheet de miembro (A1b) ---------- */
.onb-label {
  font-family: var(--f-titulos); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--tinta-400);
  margin: 18px 0 8px;
}
.onb-input {
  height: 52px; width: 100%;
  border: 2px solid var(--linea); border-radius: var(--r-input);
  background: var(--superficie); padding: 0 16px;
  font-family: var(--f-titulos); font-weight: 600; font-size: 17px;
  color: var(--tinta-900); outline: none;
}
.onb-input:focus { border-color: var(--yerba-600); }
.onb-input.error { border-color: var(--pasado); }
.onb-error-txt { font-size: 13px; color: var(--pasado-texto); margin-top: 6px; }
.onb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.onb-avatares { gap: 10px; }
.onb-emoji {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--hundido); border: 3px solid transparent;
  font-size: 25px; cursor: pointer; padding: 0; line-height: 1;
}
.onb-emoji.activo { background: var(--mate-100); border-color: var(--yerba-600); }

/* ---------- A2 Restricciones y gustos ---------- */
.onb-tabs {
  display: flex; gap: 14px; padding: 16px 0 0;
  overflow-x: auto; scrollbar-width: none;
}
.onb-tabs::-webkit-scrollbar { display: none; }
.onb-tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: none; cursor: pointer; padding: 0;
  opacity: .55; min-width: 56px; flex-shrink: 0;
}
.onb-tab.activo { opacity: 1; }
.onb-tab-av {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--hundido); border: 3px solid transparent;
  display: flex; align-items: center; justify-content: center; font-size: 24px;
}
.onb-tab.activo .onb-tab-av { background: var(--mate-100); border-color: var(--yerba-600); }
.onb-tab-nombre { font-size: 12px; color: var(--tinta-900); }
.onb-tab.activo .onb-tab-nombre { font-weight: 700; }

/* cabecera de las cards de chips */
.onb-card-cab {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
}
.onb-card-titulo {
  font-family: var(--f-titulos); font-weight: 700; font-size: 12px;
  letter-spacing: .08em; text-transform: uppercase;
}
.onb-card-titulo.duro   { color: var(--yerba-900); }
.onb-card-titulo.suave  { color: var(--yerba-600); }
.onb-card-titulo.neutro { color: var(--tinta-400); }
.onb-card-aclara { font-size: 11.5px; color: var(--tinta-400); white-space: nowrap; }
.onb-card-sub { font-size: 13px; color: var(--tinta-600); margin-top: 2px; }

/* ---------- A3 Hábitos ---------- */
/* filas de comidas con switch (la fila entera es el target) */
.onb-card-toggles { padding: 6px 16px; }
.onb-fila-toggle {
  width: 100%; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 0; min-height: 48px;
  border-bottom: 1px solid var(--hundido);
  font-family: var(--f-cuerpo); text-align: left; color: var(--tinta-900);
}
.onb-fila-toggle:last-child { border-bottom: none; }
.onb-fila-toggle .nombre { font-size: 15px; font-weight: 600; }
.onb-switch {
  width: 52px; height: 32px; border-radius: var(--r-pildora);
  background: var(--linea); position: relative; flex-shrink: 0;
  transition: background .2s ease;
}
.onb-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 28px; height: 28px; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .2s ease;
}
.onb-switch.activo { background: var(--yerba-600); }
.onb-switch.activo::after { transform: translateX(20px); }

/* sliders de extremos: el fill verde hasta el thumb (mockup A3) */
.onb-sliders { display: flex; flex-direction: column; gap: 20px; }
.slider-habito .sf-fill {
  position: absolute; left: 0; height: 8px;
  border-radius: var(--r-pildora); background: var(--yerba-600);
}

/* chips de infaltables (mate) + input dashed con Enter */
.chip-inf {
  height: 44px; display: inline-flex; align-items: center; gap: 6px;
  padding: 0 14px; border: none; cursor: pointer;
  background: var(--mate-100); color: var(--mate-texto);
  border-radius: var(--r-pildora); font-size: 14px; font-weight: 600;
  font-family: var(--f-cuerpo);
}
.chip-inf .x { opacity: .6; }
.chip-inf:hover .x { opacity: 1; }
.onb-inf-input {
  height: 44px; min-width: 140px; flex: 1;
  border: 1.5px dashed #C9C2AE; border-radius: var(--r-pildora);
  background: transparent; padding: 0 14px;
  font-family: var(--f-cuerpo); font-size: 14px; color: var(--tinta-900);
  outline: none;
}
.onb-inf-input::placeholder { color: var(--tinta-400); }
.onb-inf-input:focus { border-style: solid; border-color: var(--yerba-600); }

/* ---------- A4 Tu súper ---------- */
.onb-supers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 18px 0 0;
}
.onb-super {
  position: relative; cursor: pointer;
  background: var(--superficie);
  border: 2.5px solid transparent; outline: 1px solid var(--linea);
  border-radius: var(--r-card); padding: 18px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.onb-super.activo { border-color: var(--yerba-600); outline: none; }
.onb-super img { width: 56px; height: 56px; border-radius: 14px; }
.onb-super .nombre {
  font-family: var(--f-titulos); font-weight: 700; font-size: 15px;
  color: var(--tinta-600);
}
.onb-super.activo .nombre { color: var(--tinta-900); }
.onb-super .tic {
  position: absolute; top: 10px; right: 10px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--yerba-600); color: #FFFFFF;
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.onb-aviso-compara {
  margin-top: 14px; background: var(--yerba-50); border-radius: var(--r-input);
  padding: 12px 14px; font-size: 13.5px; color: var(--yerba-600); font-weight: 600;
}
.onb-geo {
  margin-top: 14px; background: var(--superficie);
  border: 1px solid var(--linea); border-radius: var(--r-card);
  padding: 16px; display: flex; align-items: center; gap: 12px;
}
.onb-geo .icono { font-size: 24px; }
.onb-geo-datos { flex: 1; min-width: 0; }
.onb-geo-datos .t { font-size: 14.5px; font-weight: 600; }
.onb-geo-datos .s { font-size: 12.5px; color: var(--tinta-400); }
.onb-geo-btn {
  height: 40px; padding: 0 14px; flex-shrink: 0; cursor: pointer;
  background: var(--superficie); color: var(--yerba-600);
  border: 1.5px solid var(--yerba-600); border-radius: var(--r-pildora);
  font-family: var(--f-titulos); font-weight: 700; font-size: 13px;
}
.onb-geo-btn:hover { background: var(--yerba-50); }
.onb-geo-btn.ok {
  background: var(--yerba-50); border-color: transparent; cursor: default;
}

/* ---------- A5 Cierre / resumen ---------- */
.onb-resumen {
  margin-top: 20px; background: var(--superficie);
  border: 1px solid var(--linea); border-radius: 20px; padding: 20px;
}
.onb-res-avs {
  display: flex; justify-content: center; gap: 18px; flex-wrap: wrap;
}
.onb-res-av {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  max-width: 84px;
}
.onb-res-av .circ {
  position: relative; width: 56px; height: 56px; border-radius: 50%;
  background: var(--mate-100);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.onb-res-av .candado {
  position: absolute; bottom: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--yerba-900); font-size: 9px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #FFFFFF;
}
.onb-res-av .nombre { font-size: 12.5px; font-weight: 700; text-align: center; }
.badge-res {
  font-family: var(--f-titulos); font-weight: 700; font-size: 9px;
  padding: 2px 7px; border-radius: var(--r-pildora);
  text-transform: uppercase; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.badge-res.duro  { background: var(--yerba-900); color: #FFFFFF; }
.badge-res.suave { background: var(--yerba-50); color: var(--yerba-600); }
.onb-res-filas {
  border-top: 1px solid var(--hundido);
  margin-top: 18px; padding-top: 14px;
  display: flex; flex-direction: column; gap: 10px; font-size: 14.5px;
}
.onb-res-fila {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.onb-res-fila .k { color: var(--tinta-600); flex-shrink: 0; }
.onb-res-fila .v { font-weight: 600; text-align: right; }
.onb-res-editar {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--yerba-600); font-family: var(--f-cuerpo);
  font-weight: 700; font-size: 14.5px; margin-left: 4px;
}
/* CTA gigante del cierre */
.onb-cta-gigante { height: 60px; font-size: 18px; }
