/**
 * @file
 * Section 11: Tables.
 *
 * Split from css/staged-edits-from-gui.css (see docs/Theme updates.md for
 * the full split file list).
 */

/* --------- 11.1. Primary table ----------------------------------------- */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 1rem;
  color: #111;
  border: none;
  padding-left: 40px;
  /* @AL TODO These seem overridden by the default. I also tried a calc like the current default. */
  padding-right: 40px;
  /* @AL TODO These seem overridden by the default. I also tried a calc like the current default. */
  border-radius: 12px;
}

/* Temp fix for links in tables */
table a {
  color: var(--bs-link-color) !important;
}

table a:hover {
  color: var(--bs-link-hover-color) !important;
  text-decoration: none !important;
}

/* Visually hidden header row for screen readers */
thead tr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

table tr th {
  font-size: 2em;
  color: #000;
  background-color: #f2f2f2;
  border: none;
  padding: 1rem 0.75rem;
}

/* tbody tr {
  not set yet;
}*/

tbody td {
  color: var(--bs-dark);
  border: none;
  padding: 1rem 0.75rem;
  vertical-align: middle;
}

/* First column h5 */
tbody td:first-child h5 {
  font-weight: bold;
  color: var(--bs-dark);
}

/* Striped rows */
.table-striped>tbody>tr:nth-of-type(2n+1) {
  background-color: #f2f2f2;
  color: var(--bs-dark);
}

.table-striped>tbody>tr:nth-of-type(2n) {
  background-color: rgba(0, 0, 0, 0);
  color: var(--bs-dark);
}

.table> :not(caption)>*>* {
  box-shadow: none;
}

.table-striped:last-child,
.view-cohort-sessions:last-child {
  margin-bottom: 0;
}

.table-striped>tbody>tr:nth-of-type(2n+1)>* {
  color: var(--bs-dark);
}

/* --------- 11.2. Secondary table --------------------------------------- */

/*.table-secondary thead tr {
  not set yet;
}*/

/*.table-secondary tbody tr {
  not set yet;
}*/

table.table-secondary tr th {
  color: #000;
  background-color: #f2f2f2;
  border: none;
  padding: 1rem 0.75rem;
}

.table-secondary tbody td {
  border: none;
  padding: 1rem 0.75rem;
}

.table-secondary .table-striped>tbody>tr:nth-of-type(2n+1) td {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--bs-gray-500);
}

.table-secondary .table-striped>tbody>tr:nth-of-type(2n) td {
  background-color: #ECECEC;
  color: var(--bs-gray-500);
}

/* Temp fix for table indent issue */
.table-indent .view-content.row {
  margin: 0;
}

/* Empty state messaging in views */
.view-empty {
  text-align: center;
  margin-bottom: 32px;
}
