/* JSC · estadísticas del lector (puntos 5 y 6 de JSC_para_web_pruebas, Manu Mateo). Antes al final de styleSheet.css. */

/* 25-11-2026 — Punto 5 de JSC_para_web_pruebas (Manu Mateo): «Most read this month» tal cual lo propone
   (su jsc-stats.css, solo la parte del bloque; las variables de color ya están arriba, se añade --jsc-red-soft).
   El script (barra, «views» y mes) está en JscThemePlugin.php (jscMostRead). */
:root { --jsc-red-soft: rgba(193, 39, 45, .12); }
/* ---------- Most read this month (plugin «Most Viewed»: div.most-viewed) ----------
   Sin tocar la plantilla del plugin. jsc-stats.js añade la barra proporcional, la palabra «views» y el mes. */
.most-viewed { border-top: 3px solid var(--jsc-red); padding-top: 18px; counter-reset: jsc-rank; }
.most-viewed .most-viewed-headline {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font: 700 1.5rem/1.2 var(--jsc-serif); color: var(--jsc-ink); margin: 0 0 6px; text-transform: none; letter-spacing: 0;
}
.most-viewed .jsc-mv-period {
  font: 600 .75rem/1 var(--jsc-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--jsc-muted);
}
.most-viewed .most-viewed-content {
  counter-increment: jsc-rank;
  display: grid;
  grid-template-columns: 3.25rem 1fr 9.5rem;
  grid-template-rows: auto auto auto;
  column-gap: 1.25rem;
  align-items: start;
  padding: 18px 0;
  margin: 0;
  border-bottom: 1px solid var(--jsc-rule);
}
.most-viewed .most-viewed-content:last-child { border-bottom: 0; }
.most-viewed .most-viewed-content::before {
  content: counter(jsc-rank, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / span 3;
  font: 700 2rem/1 var(--jsc-serif); color: rgba(193, 39, 45, .45);
  font-variant-numeric: lining-nums tabular-nums; padding-top: 2px;
}
.most-viewed .most-viewed-content:first-of-type::before { color: var(--jsc-red); }
.most-viewed .most-viewed-title { grid-column: 2; grid-row: 1; margin: 0; }
.most-viewed .most-viewed-title a {
  font: 600 1.12rem/1.3 var(--jsc-serif); color: var(--jsc-ink); text-decoration: none;
  background: linear-gradient(var(--jsc-red), var(--jsc-red)) 0 100% / 0 1.5px no-repeat;
  transition: background-size .25s ease, color .2s ease;
}
.most-viewed .most-viewed-title a:hover,
.most-viewed .most-viewed-title a:focus-visible { color: var(--jsc-red-dark); background-size: 100% 1.5px; }
.most-viewed .most-viewed-subtitle { grid-column: 2; grid-row: 2; font: 400 1rem/1.35 var(--jsc-serif); color: var(--jsc-ink); }
.most-viewed .most-viewed-subtitle:empty { display: none; }
.most-viewed .most-viewed-author { display: contents; }
.most-viewed .most-viewed-author > .font-italic {
  grid-column: 2; grid-row: 3; margin-top: 6px;
  font: 400 .95rem/1.35 var(--jsc-sans); font-style: normal !important; color: var(--jsc-muted);
}
.most-viewed .most-viewed-author > div:last-child { grid-column: 3; grid-row: 1 / span 3; text-align: right; padding-top: 2px; }
.most-viewed .most-viewed-author .badge {
  display: inline-block; padding: 0; background: none; border: 0; border-radius: 0;
  font: 700 1.25rem/1 var(--jsc-sans); color: var(--jsc-ink); font-variant-numeric: tabular-nums;
}
.most-viewed .most-viewed-author .badge .fa-eye { display: none; }
.most-viewed .jsc-mv-unit {
  font: 600 .72rem/1 var(--jsc-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--jsc-muted); margin-left: 4px;
}
/* barra proporcional al más leído (--share = vistas / vistas del 1.º) */
.most-viewed .jsc-mv-bar { display: block; height: 6px; margin-top: 10px; border-radius: 3px; background: var(--jsc-red-soft); overflow: hidden; }
.most-viewed .jsc-mv-bar::after {
  content: ""; display: block; height: 100%; width: calc(var(--share, 1) * 100%);
  background: rgba(193, 39, 45, .55); border-radius: 3px;
}
.most-viewed .most-viewed-content:first-of-type .jsc-mv-bar::after { background: var(--jsc-red); }

@media (max-width: 640px) {
  .most-viewed .most-viewed-content { grid-template-columns: 2.5rem 1fr; grid-template-rows: auto auto auto auto; }
  .most-viewed .most-viewed-content::before { font-size: 1.6rem; grid-row: 1 / span 4; }
  .most-viewed .most-viewed-author > div:last-child {
    grid-column: 2; grid-row: 4; text-align: left; display: flex; align-items: center; gap: 12px; margin-top: 10px;
  }
  .most-viewed .jsc-mv-bar { flex: 1; margin: 0; max-width: 160px; }
}

/* 25-11-2026 — Punto 6 de JSC_para_web_pruebas (Manu Mateo): gráfico de descargas del artículo
   (su jsc-stats.css, parte del gráfico). El script está en JscThemePlugin.php (jscUsageChart). */
/* ---------- Gráfico de descargas (OJS: section.item.downloads_chart) ----------
   El título «Downloads» conserva el estilo de sección del tema (como «References»). */
.item.downloads_chart .jsc-downloads-summary {
  font: 400 .95rem/1.4 var(--jsc-sans);
  color: var(--jsc-muted);
  margin: 0 0 10px;
}
.item.downloads_chart .jsc-downloads-summary strong {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--jsc-red);
  margin-right: 2px;
}
.item.downloads_chart canvas.usageStatsGraph { width: 100% !important; height: auto !important; }
