.table {
  width: 100%;
  max-width: 100%;
  border-spacing: 0;
  border-collapse: collapse;

  th,
  td {
    padding: 8px;
    line-height: 18px;
    vertical-align: top;
    border-top: 1px solid var(--brand-color--med);
    text-align: left;
    background: var(--brand-color--med);
  }

  & > thead > tr > th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--brand-color--med);
    border-top: 0;
    font-weight: 500;
  }

  & > tbody > tr > th {
    font-weight: 500;
  }

  & > tbody > tr:nth-child(odd) > td,
  & > tbody > tr:nth-child(odd) > th {
    background: var(--brand-color--med);
  }

  a {
    color: var(--highlight-text-color);
    text-decoration: underline;

    &:hover {
      text-decoration: none;
    }
  }

  strong {
    font-weight: 500;

    @each $lang in $cjk-langs {
      &:lang(#{$lang}) {
        font-weight: 700;
      }
    }
  }

  &.inline-table {
    & > tbody > tr:nth-child(odd) {
      & > td,
      & > th {
        background: transparent;
      }
    }

    & > tbody > tr:first-child {
      & > td,
      & > th {
        border-top: 0;
      }
    }
  }

  &.batch-table {
    & > thead > tr > th {
      background: var(--brand-color--med);
      border-top: 1px solid var(--background-color);
      border-bottom: 1px solid var(--background-color);

      &:first-child {
        border-radius: 4px 0 0;
        border-left: 1px solid var(--background-color);
      }

      &:last-child {
        border-radius: 0 4px 0 0;
        border-right: 1px solid var(--background-color);
      }
    }
  }

  &--invites tbody td {
    vertical-align: middle;
  }
}

.table-wrapper {
  overflow: auto;
  margin-bottom: 20px;
}

samp {
  font-family: var(--font-monospace), monospace;
}

button.table-action-link {
  background: transparent;
  border: 0;
  font: inherit;
}

button.table-action-link,
a.table-action-link {
  text-decoration: none;
  display: inline-block;
  margin-right: 5px;
  padding: 0 10px;
  color: var(--primary-text-color--faint);
  font-weight: 500;

  &:hover {
    color: var(--primary-text-color);
  }

  i.fa {
    font-weight: 400;
    margin-right: 5px;
  }

  &:first-child {
    padding-left: 0;
  }
}

.batch-table {
  &__toolbar,
  &__row {
    display: flex;

    &__select {
      box-sizing: border-box;
      padding: 8px 16px;
      cursor: pointer;
      min-height: 100%;

      input {
        margin-top: 8px;
      }

      &--aligned {
        display: flex;
        align-items: center;

        input {
          margin-top: 0;
        }
      }

      @media screen and (max-width: $no-gap-breakpoint) {
        display: none;
      }
    }

    &__actions,
    &__content {
      padding: 8px 0;
      padding-right: 16px;
      flex: 1 1 auto;
    }
  }

  &__toolbar {
    border: 1px solid var(--background-color);
    background: var(--brand-color--med);
    border-radius: 4px 0 0;
    height: 47px;
    align-items: center;

    &__actions {
      text-align: right;
      padding-right: 16px - 5px;
    }

    @media screen and (max-width: $no-gap-breakpoint) {
      display: none;
    }
  }

  &__row {
    border: 1px solid var(--background-color);
    border-top: 0;
    background: var(--brand-color--med);

    @media screen and (max-width: $no-gap-breakpoint) {
      &:first-child {
        border-top: 1px solid var(--background-color);
      }
    }

    &:hover {
      background: var(--background-color);
    }

    &:nth-child(even) {
      background: var(--brand-color--med);

      &:hover {
        background: var(--brand-color--faint);
      }
    }

    &__content {
      padding-top: 12px;
      padding-bottom: 16px;

      &--unpadded {
        padding: 0;
      }
    }
  }

  .status__content {
    padding-top: 0;

    summary {
      display: list-item;
    }

    strong {
      font-weight: 700;
    }
  }

  .nothing-here {
    border: 1px solid var(--background-color);
    border-top: 0;
    box-shadow: none;

    @media screen and (max-width: $no-gap-breakpoint) {
      border-top: 1px solid var(--background-color);
    }
  }

  @media screen and (max-width: 870px) {
    .accounts-table tbody td.optional {
      display: none;
    }
  }
}
