/* ═══════════════════════════════════════════════════════════════════════════
 *  Setcero Simulator v2.0 — Capa de experiencia guiada
 *  Bienvenida de una pregunta · veredicto como recompensa · refinamientos
 *  plegados. Todo sobre los tokens de style.css; jerarquía por tamaño y
 *  opacidad (Gidolinya es monopeso: nada de font-weight).
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Regla central: antes de "Ver si cabe" no hay respuesta a la vista ────── */

body.pre-verdict #summary-card,
body.pre-verdict #verdict-banner,
body.pre-verdict #slide-1 .btn-continue,
body.pre-verdict .handoff-fab {
  display: none;
}

/* Las palancas necesitan !important: renderLevers() les pone display:block
   inline en cada recálculo, y con un torneo que no cabe se filtrarían al
   Paso 1 antes de "Ver si cabe". */
body.pre-verdict #levers-container {
  display: none !important;
}

/* El botón de revelado solo existe antes del primer veredicto. */
body:not(.pre-verdict) .btn-reveal {
  display: none;
}

.btn-reveal {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

/* ── Encabezado de paso: "Paso N de 4 — Título — propósito" ──────────────── */

.slide-head {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.slide-step {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-ink);
  background: var(--terra-soft);
  border-radius: 100px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

.slide-title {
  margin: 0 0 4px;
  font-size: 24px;
  line-height: 1.15;
  color: var(--ink);
}

.slide-purpose {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

/* ── Pliegues de refinamiento (details) ──────────────────────────────────── */

.fold {
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: var(--card);
  margin: 0 0 12px;
  overflow: hidden;
}

.fold-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.fold-summary::-webkit-details-marker { display: none; }

.fold-title {
  flex: 1;
  font-size: 14.5px;
  color: var(--ink);
}

.fold-tag {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--chip);
  border-radius: 100px;
  padding: 3px 9px;
  white-space: nowrap;
}

.fold-tag-invite {
  color: var(--terra-ink);
  background: var(--terra-soft);
}

.fold-chevron {
  color: var(--ink-2);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.fold[open] .fold-chevron { transform: rotate(180deg); }

.fold[open] .fold-summary { border-bottom: 1px solid var(--line-soft); }

.fold-body { padding: 14px 16px 16px; }

/* Los bloques internos pierden su margen exterior: el pliegue ya lo da. */
.fold-body .table-responsive,
.fold-body .block-config,
.fold-body .calendar-block {
  margin-top: 0;
  margin-bottom: 0;
}

/* El calendario es la pieza destacada. */
.fold-featured { border-color: var(--line); }

/* ── Paso 3: botón "seguir de largo" arriba de la tabla ──────────────────── */

.btn-skip-step {
  width: 100%;
  justify-content: center;
  margin-bottom: 14px;
}

/* ── Identificación en el Paso 4 ─────────────────────────────────────────── */

.identity-lead {
  margin: 0 0 10px;
  font-size: 14.5px;
  color: var(--ink);
}

/* ── Revelado del veredicto ──────────────────────────────────────────────── */

@keyframes guide-reveal {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

body.revealed #verdict-banner {
  animation: guide-reveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.revealed #summary-card {
  animation: guide-reveal 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@media (prefers-reduced-motion: reduce) {
  body.revealed #verdict-banner,
  body.revealed #summary-card {
    animation: none;
  }
}

/* ── Bienvenida ──────────────────────────────────────────────────────────── */

.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  overflow-y: auto;
}

.guide-overlay[hidden] { display: none; }

.guide-card {
  width: 100%;
  max-width: 420px;
  margin: auto;
}

/* El foco inicial va al card por accesibilidad, pero el anillo visual sobre
   todo el diálogo no aporta: los controles internos conservan el suyo. */
.guide-card:focus { outline: none; }

.guide-brand {
  margin: 0 0 22px;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.guide-headline {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.1;
  color: var(--ink);
}

.guide-sub {
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.guide-question {
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-paper);
  padding: 18px 18px 16px;
  margin-bottom: 22px;
}

.guide-q-label {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
}

.guide-value-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.guide-value {
  width: 110px;
  border: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: 46px;
  line-height: 1;
  color: var(--terra-ink);
  padding: 0;
  -moz-appearance: textfield;
}

.guide-value::-webkit-outer-spin-button,
.guide-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.guide-value:focus { outline: none; border-bottom: 2px solid var(--terra); }

.guide-value-unit {
  font-size: 16px;
  color: var(--ink-2);
}

.guide-slider { margin: 4px 0 10px; }

.guide-hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}

.guide-cta {
  width: 100%;
  justify-content: center;
  font-size: 16px;
  padding: 15px 20px;
}

.guide-skip {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: none;
  border: none;
  font-family: var(--font-family);
  font-size: 13.5px;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 8px;
}

.guide-skip:hover { color: var(--ink); }

/* ── Aviso de paso bloqueado ─────────────────────────────────────────────── */

.guide-toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%);
  z-index: 500;
  max-width: min(92vw, 400px);
  background: var(--accent-solid);
  color: var(--on-accent);
  font-size: 13.5px;
  line-height: 1.4;
  border-radius: 14px;
  padding: 11px 16px;
  box-shadow: 0 8px 28px rgba(29, 28, 26, 0.25);
  text-align: center;
  animation: guide-reveal 0.3s ease both;
}

.guide-toast[hidden] { display: none; }

/* ── Escritorio ──────────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .guide-headline { font-size: 40px; }
  .slide-title { font-size: 28px; }
}
