@import '../../base/variables';

.dataTables_wrapper {
  width: 100%;
}

//General
table.dataTable,
.onyx_table {
  width: 100% !important;
  thead {
    background: $blue;
    color: white;
    font-weight: 300;
    th {
      height: 65px;
      position: sticky;
      top: 0;
      z-index: 1;
    }
  }
  tbody {
    tr {
      border-bottom: 1px solid black;

      &.selected {
        background-color: $color-white;

        &.even {
          background-color: #f8f8f8;
        }
      }
    }
    td {
      height: 50px;
      border-top: 2px solid #bfbfbf !important;
    }
    img {
      max-height: 22px;
      margin-right: 10px;
    }
    a {
      color: $blue;
      text-decoration: none;
      font-weight: 600;

      &.onyx-button--primary {
        color: $color-white;
      }
    }
  }
  .even {
    background: #f8f8f8;
  }
}

// Find a Reseller Page Table
#find_a_reseller_table.onyx_table {
  th {
    &:first-child {
      position: sticky;
      left: 0;
      z-index: 2;
      background-color: $blue;
      -webkit-box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
      box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
    }
  }
  tbody {
    td {
      &:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background-color: white;
        -webkit-box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
        box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
      }
    }
  }
  .even {
    td {
      &:first-child {
        background-color: #f8f8f8;
      }
    }
  }
}

#comparation_table.onyx_table,
#compatibility_table.onyx_table {
  &.dataTable > tbody > tr.selected > td.select-checkbox:after,
  &.dataTable > tbody > tr.selected > th.select-checkbox:after {
    font-size: 14px;
    margin-top: -3px;
    margin-left: -4px;
    text-shadow: none;
    color: $blue;
  }

  &.dataTable > tbody > tr.selected > td.select-checkbox:before,
  &.dataTable > tbody > tr.selected > th.select-checkbox:before {
    border: 1px solid black;
  }

  &.dataTable>tbody>tr>td.select-checkbox:before {
    width: 16px;
    height: 16px;
  }

  .select-checkbox {
    cursor: pointer;
  }

  th {
    &:nth-child(2) {
      position: sticky;
      left: 0;
      z-index: 2;
      background-color: $blue;
      -webkit-box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
      box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
    }
  }
  tbody {
    td {
      &:nth-child(2) {
        position: sticky;
        left: 0;
        z-index: 2;
        background-color: white;
        -webkit-box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
        box-shadow: 5px 0px 10px 0px rgba(0, 0, 0, 0.3);
      }
    }
  }
  .even {
    td {
      &:nth-child(2) {
        background-color: #f8f8f8;
      }
    }
  }

  #compatibility_table_filter {
    text-align: center;
    float: inherit;
    display: none;
    margin: 65px 0 45px;
  }
}

.dataTables_info,
.dataTables_filter {
  display: none !important;
}

.onyx_compatibility_note {
  max-width: 620px;
  display: none;
  margin: 40px auto;
  text-align: center;
  .dataTables_info {
    display: none;
  }
  a {
    text-decoration: none;
    font-weight: 600;
    color: $blue;
  }
}
#compatibility_table {
  display: none;
}

.onyx_table_searcher {
  max-width: 300px;
  margin: 40px auto 30px;
  border: none;
  border-bottom: 1px solid #222;
  position: relative;
  display: none;
  svg {
    max-width: 25px;
    margin: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    color: #222;
    z-index: 2;
  }
  .cls-1 {
    fill: #222 !important;
  }
  input {
    width: 100%;
    padding: 5px 5px 6px 45px;
    border: none;
  }
}

.onyx_table_select_filters {
  display: flex;
  justify-content: center;
  // align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  select {
    height: 36px;
    padding: 5px;
    min-width: 180px;
    border: 1px solid #222;
    color: #222;
  }
}

.onyx_table_filter_element_selected {
  color: #ed4237;
  margin-right: 15px;
  &:before {
    content: 'x ';
    cursor: pointer;
  }
}

.dataTables_length {
  margin-bottom: 1rem;
}

.dataTables_paginate {
  margin-top: 1rem;
}
