.table-scroll {
  position: relative;
  width: 100%;
  z-index: 1;
  margin: auto;
  overflow: scroll;
  padding-bottom: 10px;

  &__wrapper {
    overflow: hidden;
  }

  & table {
    width: 100%;
    min-width: 800px;
    margin: auto;
    border-collapse: collapse;
    font-size: .875rem;
    border-bottom: 1px solid $blue-grey-100;
    @include mq($from: tablet) {
      table-layout: auto;
    }

    & tr {
      background-color: lighten($blue-grey-100, 12%);

      & td {
        background-color: lighten($blue-grey-100, 12%);
      }

      &:first-of-type {
        background-color: $blue-grey-100;
      }

      &:nth-of-type(2n+2) {
        background-color: $white;

        & td {
          background-color: $white;
        }
      }

      & td {
        text-align: left;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding: 10px;
        z-index: 1;
        @include mq($from: tablet) {
          max-width: 100px;
          padding: 20px 10px;
        }
      }

      & th {
        text-align: left;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        padding: 10px;
        font-weight: 600;
        z-index: 1;
        @include mq($from: tablet) {
          max-width: 100px;
        }
      }
    }

    & .form-checkbox {
      margin: 0;
    }
  }

  &--sticky {
    & td {
      &:first-of-type {
        width: auto;
        position: sticky;
        left: 0;
        z-index: 2;
        box-shadow: 1px 0 0 0 rgba(0, 0, 0, .1);
      }
    }

    & th {
      &:first-of-type {
        width: auto;
        position: sticky;
        left: 0;
        z-index: 2;
        background-color: $blue-grey-100;
      }
    }
  }

  &--sticky-2 {
    & td {
      &:first-of-type {
        width: 41px;
        max-width: 41px;
        box-shadow: none;
      }

      &:nth-of-type(2) {
        width: auto;
        position: sticky;
        left: 41px;
        z-index: 2;
        box-shadow: 1px 0 0 0 rgba(0, 0, 0, .1);
      }
    }

    & th {
      &:first-of-type {
        width: 41px;
        max-width: 41px;
      }

      &:nth-of-type(2) {
        width: auto;
        position: sticky;
        left: 41px;
        z-index: 2;
        background-color: $blue-grey-100;
      }
    }
  }

  & .table-checkbox {
    width: 41px;
  }
}
