/* Transcrib Si — the language matrix of apps/web/languages.html.
 *
 * The table is drawn from assets/languages/data/languages.json, the file the
 * generator apps/web/tools/languages/build_languages.py writes from the code
 * of the server and from the fact base. The styles use the tokens of
 * assets/style.css, so the page follows the theme of the site.
 */

.lmatrix {
  margin-bottom: var(--space-6);
}

.lmatrix__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}

.lmatrix__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.lmatrix__field > label {
  font-size: var(--fs-200);
  font-weight: 600;
  color: var(--text-muted);
}

.lmatrix__search {
  flex: 1 1 240px;
  min-width: 200px;
  max-width: 420px;
  padding: var(--space-2) var(--space-3);
  border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-300);
}

.lmatrix__search:focus-visible,
.lmatrix__select:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.lmatrix__select {
  padding: var(--space-2) var(--space-3);
  border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--bg-raised);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-300);
}

.lmatrix__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: var(--border-w) solid var(--line-strong);
  border-radius: var(--radius-s);
  background: var(--bg-raised);
  font-size: var(--fs-300);
  cursor: pointer;
}

.lmatrix__toggle:focus-within {
  border-color: var(--brand);
  box-shadow: var(--focus);
}

.lmatrix__status {
  margin: 0;
  font-size: var(--fs-200);
  color: var(--text-muted);
}

.lmatrix__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lmatrix__scroll:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.lmatrix__table {
  min-width: 820px;
  width: 100%;
}

.lmatrix__table th,
.lmatrix__table td {
  vertical-align: top;
}

.lmatrix__sort {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.lmatrix__sort:hover {
  color: var(--text);
}

.lmatrix__sort:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-s);
}

.lmatrix__arrow::after {
  content: "\2195";
  opacity: 0.35;
}

.lmatrix__sort[data-direction="asc"] .lmatrix__arrow::after {
  content: "\2191";
  opacity: 1;
}

.lmatrix__sort[data-direction="desc"] .lmatrix__arrow::after {
  content: "\2193";
  opacity: 1;
}

.lmatrix__name {
  font-weight: 600;
}

.lmatrix__note {
  display: block;
  max-width: 30ch;
  margin-top: var(--space-1);
  font-size: var(--fs-200);
  font-weight: 400;
  color: var(--text-muted);
}

.lmatrix__code {
  font-family: var(--font-mono);
  font-size: var(--fs-300);
}

.lmatrix__sub {
  display: block;
  font-size: var(--fs-200);
  color: var(--text-muted);
  white-space: nowrap;
}

.lmatrix__yes {
  color: var(--ok);
}

.lmatrix__no {
  color: var(--text-faint);
}

.lmatrix__empty {
  padding: var(--space-4) 0;
  color: var(--text-faint);
  font-style: italic;
}

.lmatrix__error {
  padding: var(--space-4);
  border: var(--border-w) solid var(--danger);
  border-radius: var(--radius-m);
  background: var(--danger-soft);
  color: var(--danger);
}

.lmatrix__foot {
  margin-top: var(--space-4);
  font-size: var(--fs-200);
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .lmatrix__search {
    max-width: none;
  }

  .lmatrix__field {
    flex: 1 1 140px;
  }
}
