table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  table-layout: fixed;
}

header.table {
  height: 75px;
  display: flex;
  align-items: center;

  .search {
    margin-left: auto;
  }

  .filter {
    margin-top: 3px;
  }
}

tbody {
  tr {
    transition: $transition-base;
    border-bottom: 2px solid $light;
    cursor: pointer;

    &:hover {
      background-color: $light;
    }

    &:focus {
      outline: 0;
    }

    &.detail-row {
      border-bottom: 0 solid transparent;
      cursor: default;

      &:hover {
        background-color: transparent;
      }

      td {
        transition: $transition-base;
        padding: 0;
      }
    }

    .detail-container {
      transition: $transition-base;
      height: 0;
      overflow: hidden;
    }

    &.active-row {
      border-bottom: 2px solid transparent;

      &.detail-row {
        border-bottom: 2px solid $light;

        td {
          padding: 15px;
        }
      }

      .detail-container {
        height: auto;
      }
    }
  }
}

td, th {
  padding: 15px;
}

th {
  color: $dark;

  &.unsorted,
  &.ascending,
  &.descending {
    transition: $transition-base;
    cursor: pointer;

    &:hover {
      color: $gray-400;

      &:after {
        color: $gray-400;
      }
    }

    &:after {
      @include icon-font($dark, 1rem);
      transition: $transition-base;
      margin-left: 10px;
      vertical-align: middle;
    }
  }

  &.unsorted {
    &:after {
      content: '\e90f';
    }
  }

  &.ascending {
    color: $primary;

    &:after {
      content: '\e901';
      color: $primary;
    }

    &:hover {
      color: $primary-100;

      &:after {
        color: $primary-100;
      }
    }
  }

  &.descending {
    color: $primary;

    &:after {
      content: '\e904';
      color: $primary;
    }

    &:hover {
      color: $primary-100;

      &:after {
        color: $primary-100;
      }
    }
  }
}

thead {
  tr {
    border-bottom: 2px solid $gray-300;
  }
}

td.status {
  color: transparent;

  &.active {
    &:after {
      @include icon-font($green);
      position: absolute;
      content: '\e902';
    }
  }

  &.inactive {
    &:after {
      @include icon-font($red);
      position: absolute;
      content: '\e903';
    }
  }
}
