/* Formulario de preconvocatoria (por pasos). Usa los tokens de styles.css. */
.form-section { padding-top: clamp(2.5rem, 5vw, 4rem); }
.form-wrap { max-width: 760px; }

.progress { height: 8px; border-radius: 99px; background: var(--mist); overflow: hidden; margin-bottom: 2rem; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--teal); border-radius: 99px; transition: width .3s ease; }

.req { color: var(--danger); font-weight: 800; }
.opt { color: var(--muted); font-weight: 600; font-size: 0.9em; }
.req-note { color: var(--muted); font-size: 0.95rem; }

.form-step h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin-bottom: 1.5rem; outline: none; }
.step-count { display: block; font-family: var(--font-body); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.5rem; }

.field { margin: 0 0 1.6rem; padding: 0; border: 0; min-width: 0; }
.field > label:not(.choice), .field legend { display: block; font-weight: 800; color: var(--ink); margin-bottom: 0.55rem; padding: 0; line-height: 1.4; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field input[type="number"], .field textarea {
  width: 100%; min-height: 54px; padding: 0.8rem 1rem;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
  font: inherit; color: var(--text);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(31, 127, 144, 0.15); }
.hint { color: var(--muted); font-size: 0.98rem; margin: -0.2rem 0 0.6rem; }

.choices { display: grid; gap: 0.55rem; }
.choice {
  display: flex; align-items: center; gap: 0.8rem; min-height: 54px; padding: 0.7rem 1rem;
  border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 600;
}
.choice:hover { border-color: var(--mist-2); background: #FBFEFE; }
.choice input { width: 22px; height: 22px; accent-color: var(--teal); flex: none; margin: 0; }
.choice:has(input:checked) { border-color: var(--teal); background: var(--mist); }
.otro-text { margin-top: 0.2rem; }

.consent p { background: var(--mist); border-radius: 12px; padding: 1rem 1.1rem; font-size: 1rem; }
.consent p.field-msg { background: none; padding: 0; }

/* En el celular los botones flotantes tapan "Siguiente"; en el formulario no hacen falta. */
@media (max-width: 760px) { .float-btn { display: none; } }

.field.invalid > label:not(.choice), .field.invalid legend { color: var(--danger); }
.field.invalid input, .field.invalid textarea, .field.invalid .choice { border-color: var(--danger); }
.field-msg { color: var(--danger); font-weight: 700; font-size: 0.95rem; margin: 0.4rem 0 0; }

.ranking { display: grid; gap: 0.6rem; }
.rank-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; padding: 0.75rem 1rem; border: 2px solid var(--line); border-radius: 12px; }
.rank-name { font-weight: 700; color: var(--ink); }
.rank-opts { display: flex; gap: 0.4rem; }
.rank-opts label { position: relative; }
.rank-opts input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rank-opts span { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 10px; border: 2px solid var(--line); font-weight: 800; color: var(--ink); }
.rank-opts input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; }
.rank-opts input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

.crisis { border: 2px solid var(--amber); background: #FFF8EC; border-radius: 16px; padding: 1.25rem 1.4rem; margin: 0 0 1.6rem; }
.crisis h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.crisis ul { margin: 0 0 0.8rem; padding-left: 1.2rem; }
.crisis li { margin-bottom: 0.35rem; }
.crisis a { color: var(--ink); }

.form-nav { display: flex; justify-content: space-between; gap: 0.8rem; margin-top: 1rem; }
.form-nav [data-next], .form-nav [data-submit] { margin-left: auto; }

.form-done { text-align: center; padding: 2rem 0; outline: none; }
.form-done .icon-big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.5rem; background: var(--mist); color: var(--teal); }
.form-done .icon-big svg { width: 38px; height: 38px; }
.form-done .lead { margin-inline: auto; }
.form-done .crisis { text-align: left; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
