/**
* @file
* table related styles
*/
.chapter-table {
  --chapter-table-border-color: #d8dde3;
  --chapter-table-head-bg: #1cabe2;
  --chapter-table-head-color: #fff;
  --chapter-table-row-alt-bg: #fafbfc;
  --chapter-table-row-hover-bg: #eef3f8;
  --chapter-table-link-color: #0b5fff;
  --chapter-table-font-size: 1rem;
}

.chapter-table h4 {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 6px;
  font-weight: 500;
}

.chapter-table--loading {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--chapter-table-head-color);
  opacity: 0.6;
}

.chapter-table--error {
  color: #b3261e;
}

/* Bootstrap `.table-responsive`-style scroll region: always scrollable
   horizontally on narrow viewports so the table never breaks layout. */
.chapter-table__wrapper {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--chapter-table-border-color);
  border-radius: 4px;
}

/* Force a visible, always-on scrollbar instead of relying on OS overlay behavior */
.chapter-table__wrapper::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}

.chapter-table__wrapper::-webkit-scrollbar-track {
  background: var(--chapter-table-row-alt-bg);
}

.chapter-table__wrapper::-webkit-scrollbar-thumb {
  background: var(--chapter-table-border-color);
  border-radius: 6px;
}

.chapter-table__wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--chapter-table-link-color);
}

/* Firefox */
.chapter-table__wrapper {
  scrollbar-width: thin;
  scrollbar-color: var(--chapter-table-border-color) var(--chapter-table-row-alt-bg);
}

.chapter-table__table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: var(--chapter-table-font-size);
}

.chapter-table__cell {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--chapter-table-border-color);
  text-align: left;
  vertical-align: top;
}

.chapter-table__cell--head {
  background: var(--chapter-table-head-bg);
  color: var(--chapter-table-head-color);
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  min-width: 100px;
}

.chapter-table__row:nth-child(even) .chapter-table__cell:not(.chapter-table__cell--head) {
  background: var(--chapter-table-row-alt-bg);
}

.chapter-table__row:hover .chapter-table__cell:not(.chapter-table__cell--head) {
  background: var(--chapter-table-row-hover-bg);
}

.chapter-table__link,
.chapter-table__cell a {
  display: inline-block;
  text-decoration: underline;
}

.chapter-table__link:hover,
.chapter-table__cell a:hover {
  background-color: #f26a21;
}

/*custom*/
.chapter-table {
  padding: 20px 0;
}

.chapter-table>*:not(:last-child) {
  margin-bottom: 20px;
}

.chapter-table>*:last-child {
  margin-bottom: 0;
}
