/* Shared table behavior for both current and legacy DondStay layouts. */
.table {
  --dondstay-table-stripe: #f3f6f8;
}

.table-responsive {
  max-height: 72vh;
  overflow: auto;
  position: relative;
}

.table > thead {
  position: sticky;
  top: 76px;
  z-index: 20;
}

.table-responsive > .table > thead {
  top: 0;
}

.table > thead > tr > th {
  background-color: #eef1f4;
  box-shadow: inset 0 -1px 0 rgba(32, 38, 45, .16);
}

.table > thead.table-dark > tr > th,
.table > thead > tr.table-dark > th {
  background-color: #212529;
}

.table > tbody > tr:not(.table-total):not(.table-subtotal):not(.table-light):not(.table-dark):not(.table-danger):not(.table-warning):not(.table-success):nth-of-type(odd) > * {
  background-color: var(--dondstay-table-stripe);
}

.table > tbody > tr:not(.table-total):not(.table-subtotal):not(.table-light):not(.table-dark):not(.table-danger):not(.table-warning):not(.table-success):nth-of-type(even) > * {
  background-color: #fff;
}

.table > :is(thead, tbody, tfoot) > tr > :first-child {
  left: 0;
  position: sticky;
  z-index: 10;
}

.table > thead > tr > :first-child {
  z-index: 30;
}

.table > tfoot > tr > :first-child,
.table > tbody > tr.table-total > :first-child,
.table > tbody > tr.table-subtotal > :first-child {
  background-color: var(--bs-table-bg, #fff);
}

@media (max-width: 991.98px) {
  .table > thead {
    top: 68px;
  }
}
