/* ========================================================================
   Lineage tables

   Used by:
     docs/container/lineage/deep-dive/lineage-sources.md
     docs/container/lineage/deep-dive/reading-the-graph.md
     docs/container/lineage/deep-dive/permissions.md
     docs/container/lineage/tips-and-tricks.md
     docs/container/lineage/how-tos/add-upstream-connection.md
     docs/container/lineage/how-tos/add-downstream-connection.md

   Each table sets a min-width so the theme's scroll wrapper takes over on a
   narrow viewport instead of crushing the columns.
   ======================================================================== */

/* Source categories - five columns of prose, first one a short label */
.lineage-sources-table table {
  table-layout: auto;
  width: 100%;
  min-width: 64rem;
}

.lineage-sources-table table th,
.lineage-sources-table table td {
  vertical-align: top;
}

.lineage-sources-table table th:nth-child(1),
.lineage-sources-table table td:nth-child(1),
.lineage-sources-table table th:nth-child(2),
.lineage-sources-table table td:nth-child(2) {
  white-space: nowrap;
}

/* Supported data catalogs - numbered list of logo + name */
.lineage-catalog-table table {
  table-layout: auto;
  width: 100%;
  min-width: 26rem;
}

.lineage-catalog-table table th:nth-child(1),
.lineage-catalog-table table td:nth-child(1) {
  width: 15%;
  white-space: nowrap;
}

.lineage-catalog-table table th:nth-child(2),
.lineage-catalog-table table td:nth-child(2) {
  width: 85%;
}

/* What each datastore exposes - relation names that must not wrap mid-identifier */
.lineage-collection-table table {
  table-layout: auto;
  width: 100%;
  min-width: 56rem;
}

.lineage-collection-table table th,
.lineage-collection-table table td {
  vertical-align: top;
}

.lineage-collection-table table th:nth-child(1),
.lineage-collection-table table td:nth-child(1) {
  white-space: nowrap;
}

/* Provenance rows - short label against a description */
.lineage-provenance-table table {
  table-layout: auto;
  width: 100%;
  min-width: 34rem;
}

.lineage-provenance-table table th,
.lineage-provenance-table table td {
  vertical-align: top;
}

.lineage-provenance-table table th:nth-child(1),
.lineage-provenance-table table td:nth-child(1) {
  width: 20%;
  white-space: nowrap;
}

/* Role matrix - the action takes the width, the three role columns stay tight */
.lineage-permissions-table table {
  table-layout: auto;
  width: 100%;
  min-width: 44rem;
}

.lineage-permissions-table table th:nth-child(1),
.lineage-permissions-table table td:nth-child(1) {
  width: 100%;
}

.lineage-permissions-table table th:not(:first-child),
.lineage-permissions-table table td:not(:first-child) {
  white-space: nowrap;
}

/* Toolbar controls - icon + control name against a description */
.toolbar-options-table table {
  table-layout: auto;
  width: 100%;
  min-width: 48rem;
}

.toolbar-options-table table th,
.toolbar-options-table table td {
  vertical-align: top;
}

.toolbar-options-table table th:nth-child(1),
.toolbar-options-table table td:nth-child(1) {
  white-space: nowrap;
}

.toolbar-options-table table th:nth-child(2),
.toolbar-options-table table td:nth-child(2) {
  width: 100%;
}

/* API field references - a short key and type against a description */
.lineage-api-edge-table table {
  table-layout: auto;
  width: 100%;
  min-width: 46rem;
}

.lineage-api-edge-table table th,
.lineage-api-edge-table table td {
  vertical-align: top;
}

.lineage-api-edge-table table th:nth-child(1),
.lineage-api-edge-table table td:nth-child(1),
.lineage-api-edge-table table th:nth-child(2),
.lineage-api-edge-table table td:nth-child(2) {
  white-space: nowrap;
}

.lineage-api-edge-table table th:nth-child(3),
.lineage-api-edge-table table td:nth-child(3) {
  width: 100%;
}
