table {
  background-color: transparent;
}

.table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  border-collapse: collapse;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > th,
.table > tfoot > tr > td
{
  color: @table-text-color;
  padding: 7px;
  font-size: @font-size-small;
  border: 1px solid @table-border-color;
  text-align: left;
  white-space: nowrap;

  .no-border& {
    border-bottom: none;
    padding: 4px 0;
  }

  &.double-border {
    border-bottom-width: 2px;
  }

  .no-separators& {
    border-left: none;
    border-right: none;
  }
}

.table.highlight-first > thead > tr > th:first-child,
.table.highlight-first > tfoot > tr > td:first-child,
.table.highlight-first > tbody > tr > td:first-child {
  background-color: @table-first-background;
  border-right: 1px solid @table-first-border;
  font-weight: bold;
}

.table.highlight-last > thead > tr > th:last-child,
.table.highlight-last > tfoot > tr > td:last-child,
.table.highlight-last > tbody > tr > td:last-child {
  background-color: @table-last-background;
  border-left: 1px solid @table-last-border;
  font-weight: bold;
}

.table.highlight-last > tbody > tr > td:last-child {
  color: @blue;
  font-weight: normal;
}

.table.expand-last-column > tbody > tr > td:last-child {
  width: 100%;
}

.table.is-zebra > tbody > tr:nth-child(even) {
  background-color: @table-zebra-background;
}

.table > thead > tr > th {
  &.sortable {
    cursor: pointer;
  }
  .table-cell-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    &__item {
      &:hover {
        text-decoration: underline;
      }
    }
    &__caret {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      width: 40px;
      height: 20px;
      font-size: 24px; 
    } 
  }
}

.table > tfoot > tr > td {
  background-color: @table-footer-background;
  font-weight: bold;
  border-top: 2px solid @blue;
  color: @blue;
  .highlight-first&:first-child {
    color: @table-text-color;
  }
}

.table > tbody > tr > td {
  border-bottom: 1px solid @table-border-color;
}

.table-striped > tbody > tr:nth-child(even) {
  background-color: @gray-0;
}

.table > tbody > tr {
  .table__row-menu-cell {
    position: relative;
  }

  .table-row-menu {
    display: none;
  }

  &:hover {
    .table-row-menu {
      display: flex;
      position: absolute;
      top: 0;
      right: 0;
      background-color: @blue-light-bg;
    }
  }
}

.table__action {
  color: @gray-7;
  font-size: @font-size-base;
  float: left;
  border: none;
  background: transparent;
  outline: none;
  margin: 0 0 10px 0;

  &:hover {
    color: @gray-5;
  }
  &:active {
    color: @gray-4;
  }
  &:last-child {
    margin-right: 0;
  }
}

.table--fixed-first-col > thead > tr > th:first-child,
.table--fixed-first-col > tbody > tr > th:first-child,
.table--fixed-first-col > thead > tr > td:first-child,
.table--fixed-first-col > tbody > tr > td:first-child {
  width: 200px;
}

.table > tbody > tr.selected > td {
  background-color: @table-selected-color;
}

.mt-data-table {
  &__filter {
    padding: 5px;
    border-top: 1px solid @table-border-color;
    margin-bottom: 0 !important;
    border-left: none;
    border-right: none;
    background-color: @table-filter-background;

    input[type="text"] {
      background: @white !important;
    }
  }
}

.mt-table__clickable-row {
  cursor: pointer;

   &:hover {
     background-color: @blue-light-bg;
   }
}
