// Reduce column heading font size
.table thead th {
  font-size: 0.625rem;
}

// Object list tables
table.object-list {
  // Hide border of last row
  tbody > tr:last-child > td {
    border-bottom-width: 0;
  }

  // Append up/down arrow to header of column used for sorting
  th.asc > a::after {
    content: '\f0140';
    font-family: 'Material Design Icons';
  }
  th.desc > a::after {
    content: '\f0143';
    font-family: 'Material Design Icons';
  }
}

// Object attribute tables
table.attr-table {
  // Restyle row header
  th {
    font-weight: $font-weight-base;
    width: min-content;
  }

  // Restyle row border
  th,
  td {
    border-bottom-style: dashed;
  }

  // Hide border of last row in table
  tr:last-child {
    border-bottom-style: hidden;
  }

  // Permit breaking of words which don't fit on one line in the cell
  td {
    overflow-wrap: anywhere;
  }
}

// Remove bottom margin from <pre> elements inside table cells
td pre {
  margin-bottom: 0;
}

// Use base text color for table header links
table th.orderable a {
  color: var(--#{$prefix}body-color);
}

html[data-bs-theme='dark'] {
  // Adjust table header background color
  .table thead th,
  .markdown > table thead th {
    background: $rich-black !important;
  }
}
