/* Hero quiz — estilos del mini-formulario de elegibilidad embebido en la home.
 * Hereda contenedor `nd-tools-panel` (definido en hero-editorial.css) — sólo
 * agregamos lo nuevo: form, resultados, estados y CTAs internos.
 */

.nd-quiz-panel .nd-tools-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* IMPORTANTE: el panel del quiz vive sobre el hero con fondo oscuro,
 * pero las tarjetas y los inputs tienen fondo blanco. Los tokens de
 * tokens.css (var(--text-violet-tinted), var(--surface-white), etc.)
 * están scoped a :root, así que funcionan en cualquier contexto. */

.nd-quiz-time {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(248, 79, 118, 0.18);
  border: 1px solid rgba(248, 79, 118, 0.35);
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.nd-quiz-panel .nd-tools-label {
  color: var(--surface-white);
  font-weight: 700;
}

.nd-quiz-intro {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 16px;
}

.nd-quiz-form {
  display: grid;
  gap: 12px;
}

.nd-quiz-field {
  display: grid;
  gap: 6px;
}

.nd-quiz-field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.01em;
}

.nd-quiz-field select,
.nd-quiz-field input[type="number"] {
  width: 100%;
  border: 1px solid rgba(15, 15, 35, 0.12);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--surface-white);
  color: var(--text-violet-tinted);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.nd-quiz-field select:invalid,
.nd-quiz-field input[type="number"]::placeholder {
  color: var(--legacy-quiz-placeholder);
}

.nd-quiz-field select:focus,
.nd-quiz-field input[type="number"]:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(248, 79, 118, 0.15);
}

.nd-quiz-submit {
  margin-top: 4px;
  width: 100%;
  justify-content: center;
}

.nd-quiz-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.nd-quiz-fine {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 12px 0 0;
  text-align: center;
}

/* ── Resultados ── */

.nd-quiz-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  animation: nd-quiz-fade 0.25s ease;
}

@keyframes nd-quiz-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.nd-quiz-summary {
  font-size: 0.88rem;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.92);
}

.nd-quiz-summary strong {
  color: var(--brand-500);
  font-size: 1.05rem;
}

.nd-quiz-summary-soft {
  color: rgba(255, 255, 255, 0.6);
}

.nd-quiz-cards {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.nd-quiz-card {
  border: 1px solid rgba(15, 15, 35, 0.1);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--surface-white);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nd-quiz-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 15, 35, 0.06);
}

.nd-quiz-card--eligible {
  border-left: 3px solid var(--legacy-quiz-eligible-border);
}

.nd-quiz-card--maybe {
  border-left: 3px solid var(--legacy-quiz-maybe-border);
}

.nd-quiz-card--ineligible {
  border-left: 3px solid var(--neutral-400);
  opacity: 0.75;
}

.nd-quiz-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.nd-quiz-card-flag {
  font-size: 1.4rem;
}

.nd-quiz-card-status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--legacy-quiz-text-soft);
  letter-spacing: 0.01em;
}

.nd-quiz-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--legacy-quiz-placeholder);
  letter-spacing: 0.06em;
  margin: 0 0 4px;
}

.nd-quiz-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-violet-tinted);
  margin: 0;
  line-height: 1.3;
}

/* ── CTAs después de resultados ── */

.nd-quiz-cta {
  display: grid;
  gap: 8px;
}

.nd-quiz-cta .nd-btn-cta {
  width: 100%;
  justify-content: center;
}

.nd-btn-link {
  background: transparent;
  border: none;
  color: var(--brand-500);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nd-btn-link:hover {
  text-decoration-thickness: 2px;
}

/* ── Estados auxiliares ── */

.nd-quiz-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

.nd-quiz-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(248, 79, 118, 0.3);
  border-top-color: var(--brand-500);
  border-radius: 50%;
  animation: nd-quiz-spin 0.8s linear infinite;
}

@keyframes nd-quiz-spin {
  to { transform: rotate(360deg); }
}

.nd-quiz-error,
.nd-quiz-empty {
  background: var(--surface-white);
  border: 1px solid rgba(248, 79, 118, 0.35);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.88rem;
}

.nd-quiz-error strong,
.nd-quiz-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-violet-tinted);
}

.nd-quiz-error p,
.nd-quiz-empty p {
  margin: 0 0 8px;
  color: var(--legacy-quiz-text-soft);
}

/* ── Botón secundario del hero (nueva variante, vive sobre fondo oscuro) ── */

.nd-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  color: var(--surface-white);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  font-family: inherit;
}

.nd-btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.06);
}

/* Mobile: el panel ya colapsa solo abajo del copy en el grid del hero */
@media (max-width: 768px) {
  .nd-quiz-time {
    font-size: 0.65rem;
  }

  .nd-quiz-cards {
    gap: 8px;
  }
}
