/* ===========
   Tables
 =============*/

.table {
  margin-bottom: 10px;
}

.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
  border-top: 1px solid $light3;
}

.table > thead > tr > td.middle-align, .table > tbody > tr > td.middle-align {
  vertical-align: middle;
}

.table > thead > tr > th {
  border-bottom: 2px solid $light3;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.table > tbody > tr.success > td, .table > tbody > tr.success > th,
.table > tbody > tr > td.success, .table > tbody > tr > th.success,
.table > tfoot > tr.success > td, .table > tfoot > tr.success > th,
.table > tfoot > tr > td.success, .table > tfoot > tr > th.success,
.table > thead > tr.success > td, .table > thead > tr.success > th,
.table > thead > tr > td.success, .table > thead > tr > th.success {
  background-color: fade($success, 15%);
}

.table > tbody > tr.info > td, .table > tbody > tr.info > th,
.table > tbody > tr > td.info, .table > tbody > tr > th.info,
.table > tfoot > tr.info > td, .table > tfoot > tr.info > th,
.table > tfoot > tr > td.info, .table > tfoot > tr > th.info,
.table > thead > tr.info > td, .table > thead > tr.info > th,
.table > thead > tr > td.info, .table > thead > tr > th.info {
  background-color: fade($info, 15%);
}

.table > tbody > tr.warning > td, .table > tbody > tr.warning > th,
.table > tbody > tr > td.warning, .table > tbody > tr > th.warning,
.table > tfoot > tr.warning > td, .table > tfoot > tr.warning > th,
.table > tfoot > tr > td.warning, .table > tfoot > tr > th.warning,
.table > thead > tr.warning > td, .table > thead > tr.warning > th,
.table > thead > tr > td.warning, .table > thead > tr > th.warning {
  background-color: fade($warning, 15%);
}

.table > tbody > tr.danger > td, .table > tbody > tr.danger > th,
.table > tbody > tr > td.danger, .table > tbody > tr > th.danger,
.table > tfoot > tr.danger > td, .table > tfoot > tr.danger > th,
.table > tfoot > tr > td.danger, .table > tfoot > tr > th.danger,
.table > thead > tr.danger > td, .table > thead > tr.danger > th,
.table > thead > tr > td.danger, .table > thead > tr > th.danger {
  background-color: fade($danger, 15%);
}

/* Datatable */
div.dataTables_paginate {
  ul.pagination {
    margin-top: 30px;
  }
}

div.dataTables_info {
  padding-top: 38px;
}

.dt-buttons {
  float: left;
}

div#datatable-buttons_info {
  float: left;
}

/* Responsive Table (Plugin) */
.table-rep-plugin {
  .dropdown-menu li.checkbox-row {
    padding: 2px 15px !important;
  }

  .table-responsive {
    border: none !important;
  }
  tbody {
    th {
      font-size: 14px;
      font-weight: normal;
    }
  }
  .checkbox-row {
    padding-left: 40px;

    label {
      display: inline-block;
      padding-left: 5px;
      position: relative;
      &::before {
        -o-transition: 0.3s ease-in-out;
        -webkit-transition: 0.3s ease-in-out;
        background-color: $white;
        border-radius: 3px;
        border: 1px solid $muted;
        content: "";
        display: inline-block;
        height: 17px;
        left: 0;
        margin-left: -20px;
        position: absolute;
        transition: 0.3s ease-in-out;
        width: 17px;
        outline: none !important;
      }
      &::after {
        color: $light3;
        display: inline-block;
        font-size: 11px;
        height: 16px;
        left: 0;
        margin-left: -20px;
        padding-left: 3px;
        padding-top: 1px;
        position: absolute;
        top: -1px;
        width: 16px;
      }
    }
    input[type="checkbox"] {
      cursor: pointer;
      opacity: 0;
      z-index: 1;
      outline: none !important;

      &:disabled + label {
        opacity: 0.65;
      }
    }
    input[type="checkbox"]:focus + label {
      &::before {
        outline-offset: -2px;
        outline: none;
      }
    }
    input[type="checkbox"]:checked + label {
      &::after {
        content: "\f00c";
        font-family: 'FontAwesome';
      }
    }
    input[type="checkbox"]:disabled + label {
      &::before {
        background-color: $light;
        cursor: not-allowed;
      }
    }
    input[type="checkbox"]:checked + label {
      &::before {
        background-color: $white;
        border-color: $primary;
      }
      &::after {
        color: $primary;
      }
    }
  }
  table.focus-on tbody tr.focused th, table.focus-on tbody tr.focused td,
  .sticky-table-header {
    background-color: $primary;
    color: $white;
    border-color: $primary;
  }
  .sticky-table-header.fixed-solution {
    top: 70px !important;
  }
  .btn-default {
    background-color: $white;
    border: 1px solid rgba($dark, 0.3);
  }
  .btn-default.btn-primary {
    background-color: $primary;
  }
  .btn-toolbar {
    display: block;
  }
  .btn-group.pull-right {
    float: right;
    .dropdown-menu {
      left: auto;
      right: 0;
    }
  }
}

.modal-block {
  background: transparent;
  margin: 40px auto;
  max-width: 600px;
  padding: 0;
  position: relative;
  text-align: left;
}

/* Data table editable */
.add-edit-table {
  td, th {
    vertical-align: middle !important;
  }
  td {
    border: 0 !important;
  }
}

#datatable-editable .actions a {
  padding: 5px;
}

#datatable-editable .form-control {
  background-color: $white;
  width: auto;
  height: 20px;
}

#datatable-editable .fa-trash-o {
  color: $danger;
}

#datatable-editable .fa-times {
  color: $danger;
}

#datatable-editable .fa-pencil {
  color: $primary;
}

#datatable-editable .fa-save {
  color: $success;
}

#datatable td {
  font-weight: normal;
}

.modal-block {
  background: transparent;
  margin: 40px auto;
  max-width: 600px;
  padding: 0;
  position: relative;
  text-align: left;
}

/* Tablesaw */
.tablesaw thead {
  background: $light5;
  background-image: none;
  border: none;
}

.tablesaw thead th {
  text-shadow: none;
  letter-spacing: 0.06em;
}

.tablesaw thead tr:first-child th {
  padding-top: 1.1em;
  padding-bottom: 0.9em;
}

.tablesaw thead tr:first-child th {
  font-weight: 600;
  font-family: inherit;
  border: none;
}

.tablesaw td, .tablesaw tbody th {
  font-size: inherit;
  line-height: inherit;
  padding: 10px !important;
}

.tablesaw-stack tbody tr, .tablesaw tbody tr {
  border-bottom: none;
}

.tablesaw-sortable .tablesaw-sortable-head.tablesaw-sortable-ascending button:after, .tablesaw-sortable .tablesaw-sortable-head.tablesaw-sortable-descending button:after {
  font-family: FontAwesome;
  font-size: 10px;
}

.tablesaw-sortable .tablesaw-sortable-head.tablesaw-sortable-ascending button:after {
  content: "\f176";
}

.tablesaw-sortable .tablesaw-sortable-head.tablesaw-sortable-descending button:after {
  content: "\f175";
}

.tablesaw-bar .btn-select.btn-small:after, .tablesaw-bar .btn-select.btn-micro:after {
  font-size: 8px;
  padding-right: 10px;
}

.tablesaw-swipe .tablesaw-cell-persist {
  box-shadow: none;
}

.tablesaw-enhanced .tablesaw-bar .btn {
  text-shadow: none;
  background-image: none;
}

.tablesaw-enhanced .tablesaw-bar .btn.btn-select {
  &:hover {
    background: $white;
  }
}

.tablesaw-enhanced .tablesaw-bar .btn:hover, .tablesaw-enhanced .tablesaw-bar .btn:focus, .tablesaw-enhanced .tablesaw-bar .btn:active {
  color: $primary !important;
  background-color: $light5;
  outline: none !important;
  box-shadow: none !important;
  background-image: none;
}

/* Footable */
.footable-odd {
  background-color: $white;
}

.footable-detail-show {
  background-color: darken($light3, 5%);
}

.footable-row-detail {
  //background-color: #F0F4F7;
}

.footable > thead > tr > th > span.footable-sort-indicator {
  float: right;
}

.footable-pagination {
  li {
    margin-left: 5px;
    display: inline-block;
    float: left;

    a {
      position: relative;
      display: block;
      padding: .5rem .75rem;
      margin-left: -1px;
      line-height: 1.25;
      color: $dark;
      background-color: $white;
      border: 1px solid $light;
    }
  }
  li.active {
    a {
      color: $white;
    }
  }
}