/* The styles of the seo widget of transcrib.si.
 *
 * The panel of the widget, the charts of the demo page and the reveal of the
 * blocks of the page. The reveal is a transform and an opacity, and it is
 * switched off when the reader asks for less motion.
 */

.ts-seo-panel {
  margin-top: var(--space-4);
}

.ts-seo-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-300);
}

.ts-seo-panel caption {
  text-align: left;
  padding-bottom: var(--space-2);
  color: var(--text-muted);
  font-size: var(--fs-200);
}

.ts-seo-panel th,
.ts-seo-panel td {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  border-bottom: var(--border-w) solid var(--line);
  vertical-align: top;
}

.ts-seo-panel thead th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: var(--fs-200);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ts-seo-panel tbody th {
  width: 34%;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.ts-seo-panel td {
  overflow-wrap: anywhere;
}

.ts-seo-panel .ts-seo-panel__empty {
  color: var(--text-muted);
}

/* The charts: an inline SVG that scales, with a table of the same numbers
 * under it. On a narrow screen the chart scrolls sideways instead of
 * shrinking the labels into unreadable marks. */
.chart-wrap {
  overflow-x: auto;
  margin: var(--space-4) 0;
}

.ts-chart {
  display: block;
  width: 100%;
  height: auto;
  min-width: 520px;
}

.ts-chart__label {
  fill: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
}

.ts-chart__bar {
  fill: var(--brand);
}

.ts-chart__value {
  fill: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* The reveal of the blocks of the page. */
[data-seo-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  will-change: opacity, transform;
}

[data-seo-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-seo-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}
