/* =====================================================================
   REDISEÑO 2026 — bloque LISTAS Y VACÍOS
   Favoritas, Historial, Pro (tabla) y estado vacío unificado.
   Todo valor sale de los tokens; reutiliza .group / .row / .row-*.
   ===================================================================== */

/* ---- utilidad: texto solo para lector de pantalla ---- */
.rd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- estado vacío unificado ---- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-4) 0 var(--sp-6); }
.empty-fig {
  display: flex; flex-direction: column;
  width: 100%; height: 148px; box-sizing: border-box;
  padding: var(--sp-2) var(--sp-3) var(--sp-1);
  background: var(--surface-player);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  box-shadow: var(--inner-glow);
  overflow: hidden;
}
.empty-fig .fig { flex: 1; min-height: 0; }
.empty-fig .fig-cue { flex-shrink: 0; margin-top: 0; }
.empty-fig-static { align-items: center; justify-content: center; }
.empty-title { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 600; line-height: 1.3; color: var(--text-1); margin: var(--sp-5) 0 0; padding: 0 var(--sp-2); }
.empty-text { font-size: var(--fs-sm); line-height: 1.5; color: var(--text-3); margin: var(--sp-2) 0 0; padding: 0 var(--sp-2); max-width: 32ch; }
.empty-cta { width: auto; min-height: 48px; margin-top: var(--sp-5); padding: 0 var(--sp-6); }

/* ---- listas agrupadas: el primer título no necesita aire arriba ---- */
#histList > .group-title:first-child { margin-top: 0; }
#favList > .group, #histList > .group { margin-bottom: var(--sp-3); }

/* ---- Historial ---- */
.hist-item { --hi-c: var(--performance-blue); align-items: flex-start; }
.hist-item.hist-post { --hi-c: var(--recovery-teal); }
.hist-item.hist-rehab { --hi-c: var(--module-advertencia); }
.hist-item .row-icon {
  width: 40px; height: 40px;
  color: var(--hi-c);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
@supports (background: color-mix(in srgb, red 10%, transparent)) {
  .hist-item .row-icon { background: color-mix(in srgb, var(--hi-c) 16%, transparent); }
}
.hist-item .row-title { overflow-wrap: anywhere; line-height: 1.3; }
.hist-item .row-sub { overflow-wrap: anywhere; }
.hist-pain { color: var(--coral-text); white-space: nowrap; }
.hist-pain svg { color: var(--coral-text); }

/* límite del plan Base: mismo bloque, ahora con la línea de la lista */
.hist-limit {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-3); padding: var(--sp-4);
  border: 1px dashed var(--hairline-strong); border-radius: var(--r-md);
  text-align: center;
}
.hist-limit p { margin: 0; font-size: var(--fs-sm); color: var(--text-3); line-height: 1.4; }
.hist-limit .pro-lock { min-height: 44px; padding: 0 var(--sp-4); font-size: var(--fs-sm); color: var(--text-1); }

/* ---- Favoritas ---- */
.fav-row { padding: var(--sp-3) var(--sp-2) var(--sp-3) var(--sp-3); }
.fav-row .row-title { overflow-wrap: anywhere; line-height: 1.3; }
.ex-thumb.fav-thumb { width: 48px; height: 48px; }
.fav-acts { display: flex; align-items: center; flex-shrink: 0; }
.rd-ibtn {
  position: relative; isolation: isolate;
  width: 44px; height: 44px; padding: 0; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: var(--r-pill);
  color: var(--text-2); cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out-strong), color 200ms ease;
}
.rd-ibtn::before {
  content: ''; position: absolute; inset: 4px; z-index: -1;
  border-radius: 50%; background: transparent;
  transition: background 200ms ease;
}
.rd-ibtn:active { transform: scale(0.92); }
.rd-ibtn:active::before { background: rgba(244, 242, 237, 0.08); }
.rd-ibtn:focus-visible { outline: 2px solid var(--performance-blue); outline-offset: -2px; }
.rd-ibtn-play { color: var(--text-1); }
.rd-ibtn-play::before { background: rgba(75, 111, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(75, 111, 255, 0.4); }
.rd-ibtn-play:active::before { background: rgba(75, 111, 255, 0.32); }
@media (hover: hover) and (pointer: fine) {
  .rd-ibtn:hover { color: var(--text-1); }
  .rd-ibtn:not(.rd-ibtn-play):hover::before { background: rgba(244, 242, 237, 0.06); }
}

/* ---- Pro: tabla de dos columnas de valores ---- */
.pro-cmp-card { padding: 0; overflow: hidden; }
.pro-cmp-card .card-cap { margin: 0; padding: var(--sp-5) var(--sp-4) var(--sp-3); color: var(--text-3); }
table.pro-cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.pro-cmp col.c-base { width: 80px; }
.pro-cmp col.c-pro { width: 96px; }
.pro-cmp th, .pro-cmp td { padding: var(--sp-3) var(--sp-1); font-size: var(--fs-sm); line-height: 1.35; text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
.pro-cmp tbody th { padding-left: var(--sp-4); padding-right: var(--sp-2); text-align: left; font-weight: 500; color: var(--text-2); }
.pro-cmp tbody tr > * { border-top: 1px solid var(--hairline); }
.pro-cmp thead th { position: relative; padding-top: var(--sp-3); padding-bottom: var(--sp-3); font-family: var(--font-display); font-weight: 600; color: var(--text-3); }
.pro-cmp .base { color: var(--text-3); }
.pro-cmp .pro { color: var(--text-1); font-weight: 600; background: rgba(75, 111, 255, 0.08); border-left: 1px solid rgba(75, 111, 255, 0.35); border-right: 1px solid rgba(75, 111, 255, 0.35); }
.pro-cmp thead th.pro { color: var(--text-1); border-top: 2px solid var(--performance-blue); }
.pro-cmp tbody td.pro { border-top-color: rgba(75, 111, 255, 0.18); }
.pro-cmp svg { display: block; margin: 0 auto; }
.pro-cmp .pc-yes { color: var(--performance-blue); }
.pro-cmp td.base .pc-yes { color: var(--text-2); }
.pro-cmp .pc-no { color: var(--text-3); }
.pro-note { margin: var(--sp-4) 0; text-align: center; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-3); }

/* con movimiento reducido el arco de marca (fallback del estado vacío) se muestra ya dibujado */
@media (prefers-reduced-motion: reduce) {
  .empty-arc path { stroke-dashoffset: 0; }
  .empty-arc circle { opacity: 1; }
}
