/* ==========================================================================
   Calculia — Primos y compuestos: styles
   The dots are drawn as spans (rows and columns), the circle of dots and the
   factor tree as SVG. A prime and a composite are never told apart by colour
   alone: the grid marks a right tap with a tick and a wrong one with a cross,
   and the factor tree rings its primes (WCAG 1.4.1).
   ========================================================================== */

.suite-chrome-activity h1 { color: var(--mod-razonamiento); }

/* ---- Captions of the slides and of the examples ---- */
.gallery-card,
.real-card {
  align-items: center;
  border-color: var(--mod-razonamiento-suave);
}
.concept-title,
.real-text {
  min-height: 2em;
  max-width: 560px;
  color: var(--mod-razonamiento);
  font-size: 1.35rem;
  font-weight: 800;
}
.concept-text {
  min-height: 3em;
  max-width: 560px;
  color: var(--color-texto-suave);
  font-size: inherit;
  line-height: inherit;
}

/* ---- Dots: rows of dots, the leftover apart ---- */
.pz-figure { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pz-array { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pz-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pz-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mod-razonamiento);
}
/* The dots that do not fit in the rows: an empty ring, drawn apart. */
.pz-left {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  border: 2px dashed var(--color-texto-suave);
  border-radius: var(--radio);
}
.pz-dot-left { background: transparent; border: 2px solid var(--color-texto-suave); }

/* ---- The circle of dots (no rows yet) and the rows the learner makes ---- */
.pz-ring { width: 180px; height: 180px; }
.pz-svg-dot { fill: var(--mod-razonamiento); }
.pz-test-visual .pz-ring { width: 170px; height: 170px; }
.pz-test { display: flex; justify-content: center; }
.pz-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  width: 100%;
}
.pz-rows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.pz-question,
.pz-msg { margin: 0; text-align: center; }
.pz-question { font-weight: 700; }
.pz-msg { min-height: 2.6em; font-size: 1.1rem; font-weight: 700; }
.pz-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pz-rows-btn { min-width: 48px; min-height: 48px; }
.pz-rows-btn.is-selected {
  background: var(--mod-razonamiento);
  color: var(--texto-sobre-acento);
  border-color: var(--mod-razonamiento);
}

/* ---- The grid of numbers 1 … 20: the learner taps the ones of one kind ---- */
.pz-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.pz-count { margin: 0; font-weight: 700; }
.pz-cells {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 480px;
}
.pz-cell {
  position: relative;
  width: 52px;
  height: 52px;
  border: 2px solid var(--color-texto-suave);
  border-radius: var(--radio);
  background: var(--color-superficie);
  color: var(--color-texto);
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.pz-cell:focus-visible { outline: 3px solid var(--color-foco); outline-offset: 2px; }
/* A right tap: a thick green border and a tick. */
.pz-cell.is-ok {
  border: 4px solid var(--color-acierto);
  background: var(--color-acierto-suave);
}
.pz-cell.is-ok::after {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -8px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-superficie);
  color: var(--color-texto);
  font-size: 0.9rem;
  font-weight: 900;
}
/* A wrong tap: a dashed border and a cross. */
.pz-cell.is-no { border: 2px dashed var(--color-animo); }
.pz-cell.is-no::after {
  content: '✕';
  position: absolute;
  top: -10px;
  right: -8px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-superficie);
  color: var(--color-texto);
  font-size: 0.9rem;
  font-weight: 900;
}

/* ---- The factor tree of 12 ---- */
.pz-tree { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pz-tree-svg { width: 190px; height: 190px; }
.tree-line { stroke: var(--color-texto); stroke-width: 2; }
.tree-node { fill: var(--color-superficie); stroke: var(--color-texto); stroke-width: 2; }
.tree-node.is-prime { stroke-width: 4; }
.tree-num { fill: var(--color-texto); font-size: 12px; font-weight: 800; text-anchor: middle; }

/* ---- Several arrangements side by side (2 × 2, 2 × 3, …) ---- */
.pz-compare { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 28px; }
.pz-compare-side { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pz-expr {
  margin: 0;
  font-size: var(--texto-grande);
  font-weight: 700;
  color: var(--mod-razonamiento);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* The number of a question, big, above its answers. */
.pz-big {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-texto);
  font-variant-numeric: tabular-nums;
}

/* ---- The answers of the test ---- */
.answer-name { display: block; }
.answer-num {
  display: block;
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ---- The real-life objects, drawn one by one in rows that wrap on a narrow screen ---- */
.real-object {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 320px;
  min-height: 80px;
  font-size: 2.2rem;
  line-height: 1.2;
}
.real-item { display: inline-block; }
#realContinue { align-self: center; }
