/* TABLES */

.table > thead > tr > th {
  border-bottom: 1px solid #ddd;
  vertical-align: bottom;
}

.table-borderless {
  & > tr {
    border: none;

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

    & > td {
      border: none !important;
      vertical-align: middle !important;
    }
  }
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  border-top: 1px solid $border-color;
  line-height: 1.42857;
  padding: 8px;
  vertical-align: top;
}

.nav-tabs > li > a {
  color: #a7b1c2;
  font-weight: 600;
  padding: 10px 20px 10px 25px;
}

.nav-tabs > li > a:hover,
.nav-tabs > li > a:focus {
  background-color: #e6e6e6;
  color: $text-color;
}

.tab-content {
  padding: 20px 0;
}

.ibox-content.tables-view {
  background-color: inherit;
  border: none;
}

.data-table-main {
  width: 100%;

  thead {
    background-color: #f3f3f4;

    tr {
      background-color: $gray;
      color: $blueberry;
      height: 37px;

      @extend .bold;

      th {
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  tbody {
    background-color: $background-gray;

    tr > td > .dataTables_wrapper {
      display: none;
    }
  }
}

.nested-data-table {
  padding-left: 25px;
  padding-bottom: 15px;
  background-color: inherit !important;

  thead {
    tr {
      background-color: $background-gray;
      height: 37px;
      color: $dark-grey;

      @extend .medium;

      th {
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }

  tbody {
    tr {
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    tr > td:nth-child(2) {
      color: inherit !important;
    }
  }
}

.target-table-admin-users {
  thead {
    tr {
      color: $blueberry;
      height: 37px;

      @extend .bold;

      th:last-child {
        color: #f3f3f4;
        width: 50px;
      }
    }
  }

  tbody {
    background-color: $background-gray;

    tr > td:first-child {
      color: $blueberry;

      @extend .medium;
    }
  }
}

div.dataTables_wrapper div.dataTables_filter {
  input {
    width: 80% !important;
    margin-left: 0;
    color: transparent;
  }

  input:focus {
    background-image: none;
    box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5);
    border-color: $blueberry;
    color: $purplish-grey;
  }
}

div.dataTables_wrapper div.dataTables_filter label {
  font-size: 0;
}

#target-table-admin-users_filter,
.dataTables_filter {
  label {
    font-size: 0;
    float: left;
    width: 100%;
  }

  input {
    height: 30px;
    border-radius: 2px;
    box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5);
    background-color: #fff;
    background-position-x: left;
    background-position-y: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-image: url("/assets/images/icons/magnifying-glass.png");
    background-size: auto;
    background-origin: content-box;
    background-clip: border-box;
    color: transparent;
  }

  input:focus {
    background-image: none;
    box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.5);
    border-color: $blueberry;
    color: $purplish-grey;
  }
}

#target-table-admin-users_paginate,
.dataTables_paginate {
  .pagination > li > a {
    border: none;
    background-color: inherit;
    color: $blueberry;

    @extend .medium;
    @extend h5;
  }
}

.table--info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;

  #target-table-admin-users_paginate,
  .dataTables_paginate {
    display: inline;

    .pagination {
      height: 26px;

      a:hover {
        color: $blueberry;
        background-color: $white;
      }
    }
  }

  .dataTables_info {
    display: inline;
    line-height: 36px;
    vertical-align: top;

    @extend h5;

    &#target-table-admin-users_info {
      line-height: 48px;
    }
  }

  .dt-buttons.btn-group {
    margin-left: auto;

    button {
      left: 4%;

      &:active {
        -webkit-box-shadow: none;
        box-shadow: none;
        color: $blueberry;
        @extend .bold;
      }
    }

    .dt-button-collection {
      left: 5% !important;
      max-height: 400px;
      overflow-x: scroll;
    }
  }

  .btn-group,
  .btn-group-vertical {
    display: flex;
  }

  .table--import {
    background: url(/assets/images/icons/import.png) no-repeat center left;
    padding: 6px 22px;
    background-size: 16px;

    &:active:hover,
    &:active,
    &:hover {
      background: url(/assets/images/icons/import.png) no-repeat center left;
      background-size: 16px;
    }
  }

  .table--export {
    background: url(/assets/images/icons/export.png) no-repeat center left;
    padding: 6px 22px;
    background-size: 16px;

    &.false {
      display: none;
    }

    &:active:hover,
    &:active,
    &:hover {
      background: url(/assets/images/icons/export.png) no-repeat center left;
      background-size: 16px;
    }
  }

  .table--colvis {
    background: url(/assets/images/icons/column.png) no-repeat center left;
    padding: 6px 22px;
    border: none;
    background-size: 16px;

    &:active:hover,
    &:active,
    &:hover {
      background: url(/assets/images/icons/column.png) no-repeat center left;
      background-size: 16px;
    }
  }

  .table--add {
    background: url(/assets/images/icons/plus.png) no-repeat center left;
    padding: 6px 22px;
    border: none;
    background-color: inherit;

    &:active:hover,
    &:active,
    &:hover {
      background: url(/assets/images/icons/plus.png) no-repeat center left;
    }
  }

  .table--settings {
    background: url(/assets/images/icons/settings.png) no-repeat center left;
    padding: 6px 22px;
    border: none;
    background-color: inherit;
    background-size: 16px;

    &:active:hover,
    &:active,
    &:hover {
      background: url(/assets/images/icons/settings.png) no-repeat center left;
      background-size: 16px;
    }
  }
}

.target-table--add-record {
  padding: 20px 0;
}

div.dataTables_wrapper div.dt-buttons .buttons-csv {
  border: none;
  background-color: inherit;
}

.header-container1-content {
  font-size: 24px;
  color: #726d73;
  padding-top: 10px;
  margin-bottom: 0;
}

.header-container2-content {
  color: #726d73;
  font-size: 14px;
}

.main-container-content {
  color: #726d73;
  font-size: 14px;
  display: inline-block;
}

.side-container-content {
  color: #726d73;
  font-size: 14px;
}

.column-visibility-settings-modal-trigger-wrapper {
  padding: 7px 10px 7px 10px;
  display: inline-block;
  font-size: 16px;
  font-weight: 600;

  a {
    text-decoration: none;
    color: #726d73;
  }
}

.twilio_call_buttons {
  padding-left: 30px;
  padding-bottom: 12px;
}

.twilio_dialer_buttons {
  padding-top: 15px;
  text-align: right;
}

.table--settings-dropdown {
  .dropdown {
    border: none;

    select {
      float: right;
      border-radius: 0;
      border: none;
      border-bottom: solid 0.5px #979797;
      width: 150px;
      padding-bottom: 3px;
      background: url(/assets/images/icons/triangle.svg) no-repeat;
      background-position: 96%;
    }

    #dropdown,
    #team,
    .table--settings-select,
    .table--settings-nested-select {
      -webkit-appearance: none;

      /* for webkit browsers */
      -moz-appearance: none;

      /* for firefox */
      appearance: none;

      /* for modern browsers */
    }

    #dropdown::-ms-expand,
    #team::-ms-expand,
    .table--settings-select::-ms-expand,
    .table--settings-nested-select::-ms-expand {
      display: none;
    }

    #dropdown:focus:invalid,
    #team:focus:invalid,
    .table--settings-select::-ms-expand,
    .table--settings-nested-select:focus:invalid {
      border-color: #fd6347;
    }

    #dropdown:required:valid,
    #team:required:valid,
    .table--settings-select::-ms-expand,
    .table--settings-nested-select:required:valid {
      border-color: #006400;
    }
  }
}

.table--add-record-button {
  margin: 0 5px 3px 0;
}

.table--filter-bar {
  background-color: $cool-blue;
  height: 34px;

  .filter-bar--info {
    display: inline-flex;
    height: inherit;
    align-items: center;
  }

  .filter-bar--seperator {
    padding: 0 10px;
  }

  .filter-bar--clear,
  .filter-bar--delete,
  .filter-bar--edit {
    cursor: pointer;
  }
}

img.rotate {
  -webkit-transform: rotate(270deg);
  -moz-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  -o-transform: rotate(270deg);
  transform: rotate(270deg);
}

.table--clickable-cell {
  cursor: pointer;
  color: $purple;
}
