.data-table-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--bp-tablet);
}


.cell-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Remember to set a max-width */
.cell-wrap {
  white-space: normal;
  overflow-wrap: break-word;
}

.large-column{
  max-width: 400px;
}

.medium-column{
  max-width: 200px;
}

.small-column{
  max-width: 100px;
}

.action-column{
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding-left: 4px;
  padding-right: 4px;
}

.table-actions {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  min-height: calc(32rem / 16);
  margin-bottom: 16px;
}

.table-actions form {
  flex: 1;
  max-width: 400px;
}

.table-actions input {
  margin-bottom: 0;
}

.table-actions button {
  align-self: flex-start;
  white-space: nowrap;
}

/* The wrapper is a flex item of .data-table-container; flex items default to
   min-width: auto, which prevents shrinking below the table's content width
   and stops the scrollbar from ever appearing. */
.data-table-container > div {
  min-width: 0;
  max-width: 100%;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  /* grow up to 640px when there's room; scroll below that */
  min-width: 640px;
}

.data-table th a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.data-table th a svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 16px;
}

.page-btn {
  border: 1px solid var(--off-background-color);
  background: var(--background-color);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.page-btn:hover:not(:disabled):not(.active) {
  background: var(--off-background-color);
}

.page-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
  cursor: default;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 6px 4px;
  user-select: none;
}

.page-total {
  display: block;
  margin-top: 8px;
  opacity: 0.7;
  font-size: 0.9em;
}

/* keep in sync with --bp-tablet (var() not allowed in @media) */
@media (max-width: 1024px) {
  .table-actions {
    flex-direction: column;
  }

  .table-actions form {
    width: 100%;
    max-width: none;
  }

  .table-actions a {
    width: 100%;
  }
}

/* keep in sync with --bp-mobile (var() not allowed in @media) */
@media (max-width: 640px) {
  .data-table-container {
    padding: 6px;
  }

  .data-table th,
  .data-table td {
    padding: 6px 4px;
    font-size: 0.85em;
  }
}
