/*
 * Resultados de un estudio de ecp (/test/ecp/consulta/:code), sobre la superficie de marca: usa la
 * columna y el encabezado del detalle (test-detail.css), con los aros arriba y sin cinta. Cada
 * estilo toma sus colores de .tone-a…d (components.css): --accent, --accent-soft y --accent-ink.
 * El texto sobre --accent-soft va en el color de texto (en claro, el -ink sobre el -soft no llega
 * a AA); el color del estilo lo lleva su ícono.
 */
.ecp-report__main {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  padding-block: var(--space-6) max(var(--space-10), calc(env(safe-area-inset-bottom) + var(--space-6)));
}

.ecp-report__title {
  font-size: var(--text-question);
  font-weight: var(--weight-black);
  line-height: var(--text-display-leading);
  letter-spacing: var(--text-display-tracking);
}

.ecp-report__team {
  margin-top: var(--space-2);
  color: var(--brand-text-muted);
  font-size: var(--text-body);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ecp-report__team:empty,
.ecp-report__responded:empty {
  display: none;
}

.ecp-report__responded {
  margin-top: var(--space-1);
  color: var(--brand-text-muted);
  font-size: var(--text-small);
  line-height: var(--text-small-leading);
  font-variant-numeric: tabular-nums;
}

.ecp-report__body {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

/* ------------------------------------------------------------------
 * Resumen por estilo: cada cifra es un filtro
 * ------------------------------------------------------------------ */
.ecp-report__summary {
  display: grid;
  gap: var(--space-3);
}

.ecp-report__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
}

@media (min-width: 440px) {
  .ecp-report__filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Ficha: la cifra grande y, debajo, el ícono y el nombre del estilo. */
.ecp-report__filter {
  display: grid;
  grid-template-areas:
    "count count"
    "icon label";
  grid-template-columns: auto 1fr;
  align-items: center;
  justify-items: start;
  gap: var(--space-1) 6px;
  min-height: 48px;
  padding: var(--space-3);
  border: 1px solid var(--brand-glass-border);
  border-radius: 16px;
  background: var(--brand-glass);
  color: var(--brand-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.ecp-report__filter-count {
  grid-area: count;
  font-size: 1.625rem;
  font-weight: var(--weight-black);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ecp-report__filter-icon {
  grid-area: icon;
  width: 18px;
  height: 18px;
  color: var(--accent-ink);
}

.ecp-report__filter-label {
  grid-area: label;
  min-width: 0;
  font-size: var(--text-small);
  font-weight: var(--weight-semibold);
  line-height: 1.2;
}

/* Todos: una franja de lado a lado, con el nombre y la cifra en la misma línea. */
.ecp-report__filter--all {
  grid-column: 1 / -1;
  grid-template-areas: "label count";
  grid-template-columns: 1fr auto;
  padding-inline: var(--space-4);
}

.ecp-report__filter--all .ecp-report__filter-label {
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
}

.ecp-report__filter--all .ecp-report__filter-count {
  justify-self: end;
  font-size: 1.25rem;
}

.ecp-report__filter[aria-pressed="true"] {
  border-color: var(--accent, var(--brand-violet));
  background: var(--accent-soft, var(--brand-link-bg));
  box-shadow: inset 0 0 0 1px var(--accent, var(--brand-violet));
}

.ecp-report__filter:focus-visible {
  outline: 2px solid var(--brand-sky);
  outline-offset: 2px;
}

.ecp-report__filter:disabled {
  cursor: default;
  opacity: 0.5;
}

@media (hover: hover) {
  .ecp-report__filter:not(:disabled, [aria-pressed="true"]):hover {
    border-color: var(--brand-glass-border-strong);
  }
}

.ecp-report__note {
  color: var(--brand-text-muted);
  font-size: var(--text-small);
  line-height: var(--text-small-leading);
}

/* ------------------------------------------------------------------
 * Participantes: una píldora por persona (no se toca: no es botón)
 * ------------------------------------------------------------------ */
.ecp-report__people {
  display: grid;
  gap: var(--space-3);
}

.ecp-report__person {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  min-height: 64px;
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border: 1px solid var(--brand-glass-border);
  border-radius: 28px;
  background: var(--brand-action-bg);
}

.ecp-report__person-text {
  display: grid;
  flex: 1 1 10rem;
  min-width: 0;
  gap: 2px;
}

.ecp-report__person-name {
  font-size: var(--text-body);
  font-weight: var(--weight-bold);
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ecp-report__person-position {
  color: var(--brand-text-muted);
  font-size: var(--text-small);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ecp-report__person-styles {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

.ecp-report__style {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--brand-text);
  font-size: var(--text-small);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  white-space: nowrap;
}

.ecp-report__style-icon {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent-ink);
}
