/* Tables */

.thead-inverse th {
  background-color: $table-primary-color;
  color: $color-white; // Bootstrap 3
}

.table {
  font-size: 1.1rem;

  th {
    border-top: none;
    font-weight: 500;
  }

  th,
  td {
    border-color: $table-border-color !important; // Impotant Bootstrap 3
    padding: 1.2rem 1.4rem !important; // Impotant Bootstrap 3
  }
}

.table-bordered {
  border: none;

  thead {
    th {
      border-bottom: none !important; // Impotant Bootstrap 3
    }
  }
}

.table thead {
  tr {
    th {
      border-bottom: none;
      vertical-align: middle;
    }
  }
}

.table-bordered thead th:first-of-type {
  border-left: none;
}

.table-bordered thead th:last-of-type {
  border-right-color: $table-primary-color;
}

.table tbody {
  tr {
    &:first-of-type {
      td {
        border-top: 0;
      }
    }
  }
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: transparent;
}

.table-striped tbody tr:nth-of-type(even) {
  background-color: $table-stripe-color;
}

// Mobile table fixes

.table-container {
  margin: 0 0 1em;
  overflow-y: auto;
  width: 100%;

  &::-webkit-scrollbar {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
  }

  &::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.3);
    border: 3px solid $color-white;
    border-radius: 8px;
  }

  .table {
    @include breakpoint(xs) {
      margin-bottom: 2rem;
      position: relative;

      &::after {
        bottom: -32px;
        content: 'Scroll to view table \2192';
        font-size: 0.9rem;
        font-weight: 100;
        position: absolute;
      }
    }
  }
}

.no-scroll-table-container {
  overflow-y: inherit !important;
  overflow: inherit !important;
  .table {
    &::after {
      content: '' !important;
    }
  }
}
