/*
 * Onboarding v2 (STR-061, DEC-012): el acabado aprobado en el lienzo
 * `Operations/Architecture/APP_V2/maquetas/onboarding-unificado-v2/` (https://claude.ai/artifact/LAFRUYCq1pyWs5Q7nb8qAd).
 * Listas agrupadas como Ajustes, títulos grandes a la izquierda, botón azul sólido, controles
 * segmentados, ocho secciones. Sin brillos ni halos; degradados solo dentro de un mismo tono.
 * Va encima de styles.css y solo toca las preguntas (`.question-stage`), el carril y la entrada de
 * sección: la portada, el pago, acceso y éxito siguen como estaban.
 */
:root {
  --v2-elev: #1c1c1e;
  --v2-elev2: #2c2c2e;
  --v2-sep: rgba(84, 84, 88, .55);
  --v2-label2: rgba(235, 235, 245, .62);
  --v2-label3: rgba(235, 235, 245, .32);
  --v2-azul: #0a84ff;
  --v2-seg: rgba(118, 118, 128, .24);
  --v2-seg-sel: #636366;
}

/* ── Cabecera: sin azul con halo ni rojo; botones grises discretos ── */
.topbar-actions .route-map-link,
.topbar-actions .route-map-link:hover { background: rgba(118, 118, 128, .24); border-color: transparent; color: #fff; box-shadow: none; }
.topbar-actions #reset-button,
.topbar-actions #reset-button:hover { background: rgba(118, 118, 128, .24); border-color: transparent; color: var(--v2-label2); }

/* ── Las ocho secciones ── */
.question-stage ~ .onb-secciones, .onb-secciones { font-family: inherit; }
body:has(.onb-secciones:not([hidden])) .progress-track { display: none; }
.onb-secciones ol { list-style: none; margin: 0; padding: 0; }
.onb-secciones__titulo { display: none; }
/* Móvil y tableta: barra partida en ocho, con la sección debajo. */
.onb-secciones { width: min(100% - 32px, 640px); margin: 8px auto 0; display: flex; flex-direction: column; gap: 8px; }
.onb-secciones ol { display: flex; gap: 4px; }
.onb-secciones li { flex: 1; height: 4px; border-radius: 2px; background: rgba(120, 120, 128, .32); overflow: hidden; }
.onb-secciones li[data-estado="hecha"] { background: #fff; }
.onb-secciones li[data-estado="actual"] { background: linear-gradient(90deg, #fff 50%, rgba(120, 120, 128, .32) 50%); }
.onb-secciones li > i, .onb-secciones li > span, .onb-secciones li > small { display: none; }
.onb-secciones__texto { font-size: 13px; font-weight: 600; color: var(--v2-label2); letter-spacing: -.01em; }
/* Ordenador: carril a la izquierda con el nombre de cada sección. */
@media (min-width: 1100px) {
  .onb-secciones { position: fixed; left: max(24px, calc(50vw - 620px)); top: 112px; width: 220px; margin: 0; gap: 10px; z-index: 5; }
  .onb-secciones__titulo { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--v2-label3); margin: 0 10px 2px; }
  .onb-secciones ol { flex-direction: column; gap: 2px; }
  .onb-secciones li { flex: none; height: 34px; background: none !important; border-radius: 8px; display: flex; align-items: center; gap: 11px; padding: 0 10px; font-size: 14px; color: var(--v2-label2); overflow: visible; }
  .onb-secciones li > i, .onb-secciones li > span, .onb-secciones li > small { display: revert; }
  .onb-secciones li > i { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px var(--v2-label3); }
  .onb-secciones li[data-estado="hecha"] { color: #fff; }
  .onb-secciones li[data-estado="hecha"] > i { background: #fff; box-shadow: none; }
  .onb-secciones li > i svg { width: 11px; height: 11px; fill: none; stroke: #000; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
  .onb-secciones li[data-estado="actual"] { background: rgba(255, 255, 255, .07) !important; color: #fff; font-weight: 600; }
  .onb-secciones li[data-estado="actual"] > i { box-shadow: inset 0 0 0 1.5px var(--v2-azul); }
  .onb-secciones li[data-estado="actual"] > i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--v2-azul); }
  .onb-secciones li > small { margin-left: auto; font-size: 12px; color: var(--v2-label3); }
  .onb-secciones__texto { display: none; }
}

/* ── La pregunta ── */
.question-stage .surface { text-align: left; width: min(100%, 640px); margin-inline: auto; }
.question-stage .surface > h1 { text-align: left; font-size: clamp(30px, 4.2vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 0; text-wrap: balance; }
.question-stage .q-over { margin: 0; font-size: 13px; font-weight: 600; color: var(--v2-label2); letter-spacing: -.01em; }
.question-stage .surface > .subtitle { text-align: left; margin: 12px 0 0; font-size: 17px; color: var(--v2-label2); max-width: none; }

/* Lista agrupada (una sola caja, filas con separador) */
.question-stage .choice-list:not(.compact) { width: 100%; margin: 28px 0 0; display: flex; flex-direction: column; gap: 0; background: var(--v2-elev); border-radius: 14px; overflow: hidden; }
.question-stage .choice-list:not(.compact) .choice { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 16px; margin: 0; background: transparent; border: 0; border-radius: 0; font-size: 17px; font-weight: 400; letter-spacing: -.02em; color: #fff; text-align: left; box-shadow: none; }
.question-stage .choice-list:not(.compact) .choice + .choice::before { content: ""; position: absolute; top: 0; right: 0; left: 16px; border-top: .5px solid var(--v2-sep); }
.question-stage .choice-list:not(.compact) .choice.con-icono + .choice::before,
.question-stage .choice-list:not(.compact) .choice + .choice.con-icono::before { left: 60px; }
.question-stage .choice-list:not(.compact) .choice:hover { background: rgba(255, 255, 255, .04); }
.question-stage .choice-list:not(.compact) .choice[aria-pressed="true"],
.question-stage .choice-list:not(.compact) .choice[aria-pressed="true"]:hover { background: transparent; color: #fff; font-weight: 600; border: 0; }
.question-stage .choice-tx { flex: 1; min-width: 0; }
.question-stage .choice-check { display: none; flex: none; width: 20px; }
.question-stage .choice-check svg { width: 18px; height: 18px; fill: none; stroke: var(--v2-azul); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.question-stage .choice[aria-pressed="true"] .choice-check { display: grid; place-items: center; }
.question-stage .choice-ic { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; background: var(--c); }
.question-stage .choice-ic svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Preguntas dentro de una pantalla (composite): el rótulo, como cabecera de lista de iOS */
.question-stage .question-group legend { margin: 0 0 8px; padding-left: 4px; font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: .02em; color: var(--v2-label2); }
.question-stage .question-group + .question-group { margin-top: 22px; }

/* Varias opciones en rejilla (lo que no es segmentado ni tarjetas) */
.question-stage .choice-list.compact:not(.segmented):not(.tiles) { margin-top: 0; gap: 8px; }
.question-stage .choice-list.compact:not(.segmented):not(.tiles) .choice { position: relative; min-height: 48px; padding: 12px 40px 12px 14px; background: var(--v2-elev); border: 0; border-radius: 12px; font-size: 15px; font-weight: 500; color: #fff; }
.question-stage .choice-list.compact:not(.segmented):not(.tiles) .choice[aria-pressed="true"] { background: var(--v2-elev); box-shadow: inset 0 0 0 2px var(--v2-azul); }
.question-stage .choice-list.compact:not(.segmented):not(.tiles) .choice-check { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

/* Control segmentado */
.question-stage .choice-list.segmented { display: flex; gap: 0; padding: 2px; margin-top: 0; border-radius: 9px; background: var(--v2-seg); }
.question-stage .choice-list.segmented .choice { flex: 1; min-height: 32px; padding: 0 6px; border: 0; border-radius: 7px; background: transparent; font-size: 14px; font-weight: 500; color: #fff; text-align: center; justify-content: center; white-space: nowrap; box-shadow: none; }
.question-stage .choice-list.segmented .choice[aria-pressed="true"],
.question-stage .choice-list.segmented .choice[aria-pressed="true"]:hover { background: var(--v2-seg-sel); font-weight: 600; border: 0; color: #fff; }
.question-stage .choice-list.segmented .choice-check { display: none !important; }

/* Tarjetas (qué deporte, qué cardio) */
.question-stage .choice-list.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 0; }
.question-stage .choice-list.tiles .choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-height: 92px; padding: 14px; background: var(--v2-elev); border: 0; border-radius: 14px; font-size: 15px; font-weight: 500; color: #fff; text-align: left; }
.question-stage .choice-list.tiles .choice[aria-pressed="true"],
.question-stage .choice-list.tiles .choice[aria-pressed="true"]:hover { background: var(--v2-elev); box-shadow: inset 0 0 0 2px var(--v2-azul); color: #fff; border: 0; }
.question-stage .choice-list.tiles .choice-ic { border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, transparent); }
.question-stage .choice-list.tiles .choice-ic svg { stroke: var(--c); }
.question-stage .choice-list.tiles .choice-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--v2-azul); }
.question-stage .choice-list.tiles .choice-check svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3.4; }
/* El deporte actual, sin composite: sus ocho opciones también en tarjetas */
.question-stage [data-step-id="CORE-11"] .choice-list:not(.compact) { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; background: none; border-radius: 0; overflow: visible; }
.question-stage [data-step-id="CORE-11"] .choice-list:not(.compact) .choice { flex-direction: column; align-items: flex-start; min-height: 92px; padding: 14px; background: var(--v2-elev); border-radius: 14px; font-size: 15px; font-weight: 500; }
.question-stage [data-step-id="CORE-11"] .choice-list:not(.compact) .choice::before { display: none; }
.question-stage [data-step-id="CORE-11"] .choice-list:not(.compact) .choice[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--v2-azul); font-weight: 500; }
.question-stage [data-step-id="CORE-11"] .choice-ic { border-radius: 50%; background: color-mix(in srgb, var(--c) 18%, transparent); }
.question-stage [data-step-id="CORE-11"] .choice-ic svg { stroke: var(--c); }
.question-stage [data-step-id="CORE-11"] .choice-check { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; background: var(--v2-azul); }
.question-stage [data-step-id="CORE-11"] .choice-check svg { width: 12px; height: 12px; stroke: #fff; stroke-width: 3.4; }

/* ── Botones ── */
.question-actions [data-continue].primary,
.question-actions [data-continue].primary:hover { background: var(--v2-azul); border: 0; color: #fff; border-radius: 12px; font-weight: 600; box-shadow: none; }
.question-actions [data-continue].primary[aria-disabled="true"] { opacity: .38; }
.question-actions [data-back].secondary,
.question-actions [data-back].secondary:hover { background: rgba(118, 118, 128, .24); border: 0; border-radius: 12px; color: #fff; }
.question-stage .defer { display: block; margin: 22px 0 0; padding: 0; background: none; border: 0; color: var(--v2-azul); font-size: 16px; font-weight: 400; text-decoration: none; cursor: pointer; }
.question-stage .validation-message { color: #ff453a; font-size: 14px; text-align: left; }
.question-stage .validation-message:empty { min-height: 0; margin: 0; }
