/* ============================================================
   form.css — Estilos del formulario público de baja.
   ============================================================ */

.form-body { background:
    radial-gradient(1200px 500px at 50% -200px, var(--brand-050), transparent 60%),
    var(--bg);
  min-height: 100vh;
}

/* ---------- Cabecera ---------- */
.form-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.form-header__inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; }

/* ---------- Layout ---------- */
.form-main { max-width: 760px; padding-block: 36px 64px; }
.form-intro { text-align: center; margin-bottom: 28px; }
.form-intro h1 { font-size: var(--fs-2xl); }
.form-intro p { max-width: 56ch; margin-inline: auto; }

/* ---------- Indicador de pasos ---------- */
.steps {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 0; margin: 0 0 22px; counter-reset: step;
}
.steps__item { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; color: var(--muted); }
.steps__item::before {
  content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2px;
  background: var(--line); z-index: 0;
}
.steps__item:first-child::before { display: none; }
.steps__num {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); border: 2px solid var(--line); font-weight: 700; font-size: var(--fs-sm);
  position: relative; z-index: 1; transition: all var(--transition);
}
.steps__label { font-size: var(--fs-xs); font-weight: 600; }
.steps__item.is-active { color: var(--brand-700); }
.steps__item.is-active .steps__num { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-050); }
.steps__item.is-done { color: var(--brand-600); }
.steps__item.is-done .steps__num { border-color: var(--brand-600); background: var(--brand-050); color: var(--brand-700); }
.steps__item.is-done::before,
.steps__item.is-active::before { background: var(--brand-300); }
@media (max-width: 520px) { .steps__label { display: none; } }

/* ---------- Tarjeta del formulario ---------- */
.form-card { padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow-sm); }
.step { animation: step-in var(--transition); }
.step:not(.is-active) { display: none; }
.step__title { font-size: var(--fs-xl); margin-bottom: 22px; outline: none; }
@keyframes step-in { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }

/* ---------- Buscador de cursos ---------- */
.search { position: relative; }
.search__results {
  list-style: none; margin: 6px 0 0; padding: 6px; position: absolute; inset-inline: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); max-height: 260px; overflow-y: auto;
}
.search__item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: background var(--transition);
}
.search__item:hover, .search__item:focus { background: var(--brand-050); outline: none; }
.search__item-name { font-size: var(--fs-sm); font-weight: 500; }
.search__empty { padding: 12px; color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.curso-selected {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--brand-tint);
  border: 1px dashed var(--brand-300); font-size: var(--fs-sm);
}

/* ---------- NPS ---------- */
.nps { border: 0; padding: 0; margin: 0 0 22px; }
.nps__scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 6px; margin-top: 6px; }
.nps__btn {
  aspect-ratio: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--radius-sm);
  font-weight: 700; font-size: var(--fs-sm); color: var(--ink-soft); cursor: pointer; transition: all var(--transition);
}
.nps__btn:hover { border-color: var(--brand-300); }
.nps__btn:focus-visible { outline: 3px solid var(--brand-100); }
.nps__btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.nps__legend { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; }
/* En móvil mantenemos los 11 valores en una sola fila (escala NPS clásica),
   pero sin aspect-ratio para que no crezcan en altura al estrecharse. */
@media (max-width: 480px) {
  .nps__scale { gap: 4px; }
  .nps__btn { aspect-ratio: auto; min-height: 38px; font-size: var(--fs-xs); padding: 0; }
}

/* ---------- Checkbox privacidad ---------- */
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-sm); color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--brand); flex: 0 0 auto; }
.check.is-invalid { color: var(--danger); }

/* ---------- Navegación ---------- */
.form-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line-soft); }
.form-nav__spacer { flex: 1; }
.form-foot { text-align: center; font-size: var(--fs-xs); margin-top: 24px; }
