table:not(.component) {
  --border-color: rgba(var(--color-smoke-30) / 0.18);
  --cell-padding-horizontal: 8px;
  --cell-padding-vertical: 8px;

  border-collapse: separate;
  border-spacing: 0;
  width: 100%;

  td,
  th {
    padding: var(--cell-padding-vertical) var(--cell-padding-horizontal);

    &.right {
      text-align: right;
    }

    &.border-left {
      border-left: 1px solid var(--border-color);
    }

    &.border-right {
      border-right: 1px solid var(--border-color);
    }
  }

  thead {
    color: var(--color-smoke-20);

    tr:last-of-type :is(th, td) {
      border-bottom: 1px solid var(--border-color);
      padding-bottom: calc(var(--cell-padding-vertical) - 1px);
    }

    th,
    td {
      text-align: left;
      font-weight: 600;
    }

    tr.subhead {
      padding-top: 0;
      color: rgba(var(--color-smoke-40));
      font-weight: normal;
    }

    &:has(tr.subhead) tr:not(.subhead):has(+ tr.subhead) :is(th, td) {
      padding-bottom: 0;
    }
  }

  tbody {
    tr {
      background-color: #f9f9f9;
    }

    tr:nth-child(even) {
      background-color: #f0f0f0;
    }

    tr:hover {
      background-color: rgba(var(--color-ocean-90));
    }
  }

  tfoot {
    th,
    td {
      text-align: left;
    }

    & > tr :is(th, td) {
      border-top: 1px solid var(--border-color);
    }
  }
}

.full_bleed table:not(.component) {
  :is(th, td):first-child,
  :is(th, td):first-child.hidden + * {
    padding-left: var(--primary-content-padding-horizontal);
  }
  :is(th, td):last-child {
    padding-right: var(--primary-content-padding-horizontal);
  }
}

table:not(.component).faculty_activities {
  --border-radius: 0.5rem;

  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);

  :is(thead, tbody):first-child {
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
  }

  &:not(:has(tfoot)) tbody:last-of-type tr:last-of-type :is(th, td):first-child,
  &:not(:has(tfoot)) tbody:last-of-type tr:last-of-type :is(th, td):first-child.hidden + *, /* Account for bulk edit cell */
  &:has(tfoot) tfoot:last-of-type tr:last-of-type :is(th, td):first-child,
  &:has(tfoot) tfoot:last-of-type tr:last-of-type :is(th, td):first-child.hidden + * {
    border-bottom-left-radius: var(--border-radius);
  }

  &:not(:has(tfoot)) tbody:last-of-type tr:last-of-type :is(th:last-child, td:last-child),
  &:has(tfoot) tfoot:last-of-type tr:last-of-type :is(th:last-child, td:last-child) {
    border-bottom-right-radius: var(--border-radius);
  }
}
