.statistics_page_wps_settings_page.wps_page #TB_window {
  top: 50% !important;

  table {
    width: 100%;

    tr {
      &:first-child {
        td {
          white-space: nowrap;
        }
      }

      td {
        word-break: break-word;
        @media screen and (max-width: 650px) {
          white-space: nowrap;
          width: auto;
        }
      }
    }
  }
}

.wps_page .select2-dropdown {
  z-index: 9999999 !important;
  border-color: #dadce0;

  .select2-search__field {
    border-color: #dadce0 !important;
  }
}


.wps_page #TB_window {
  max-height: 90vh;
  max-width: 98%;
  box-shadow: 4px 4px 25px 0 #0000001A;
  border-radius: 4px;
  border: none;
  margin: 0 !important;
  transform: translateY(-50%) translateX(-50%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-sizing: border-box;
  overflow: auto;
  height: auto !important;
  top: 50% !important;

  #TB_ajaxContent {
    width: auto !important;
    max-width: 100% !important;
    padding: 0;
    height: auto !important;
    overflow: visible;

    .select2-container {
      line-height: 36px;
      color: $white-color;
      letter-spacing: .05rem;
      width: 100% !important;
      z-index: 4 !important;

      * {
        height: 36px;
        line-height: 21px !important;
        font-size: 13px;
        font-weight: 400;
        letter-spacing: .05rem;
      }

      .select2-selection--single {
        background-color: transparent;
        color: $dim-black-color;
        border: 1px solid #DADCE0 !important;
        border-radius: 3px;
      }

      .select2-selection__placeholder {
        color: #0c0c0d;
      }

      .select2-selection__rendered {
        color: $dim-black-color;
        padding: 6px 25px 6px 12px;
        box-sizing: border-box;
      }

      &--open {
        .select2-selection__arrow b {
          display: none;
        }
      }

      .select2-selection__arrow {
        top: 0 !important;

        b {
          background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAxNCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuOTk5NzggOS44MzMxMkM2LjkyMzAxIDkuODMzNTYgNi44NDY5MSA5LjgxODg0IDYuNzc1ODQgOS43ODk4MUM2LjcwNDc2IDkuNzYwNzkgNi42NDAxMiA5LjcxODAxIDYuNTg1NjIgOS42NjM5NUwzLjA4NTYyIDYuMTYzOTVDMi45NzU3NyA2LjA1NDExIDIuOTE0MDYgNS45MDUxMyAyLjkxNDA2IDUuNzQ5NzhDMi45MTQwNiA1LjU5NDQ0IDIuOTc1NzcgNS40NDU0NiAzLjA4NTYyIDUuMzM1NjJDMy4xOTU0NiA1LjIyNTc3IDMuMzQ0NDQgNS4xNjQwNiAzLjQ5OTc4IDUuMTY0MDZDMy42NTUxMyA1LjE2NDA2IDMuODA0MTEgNS4yMjU3NyAzLjkxMzk1IDUuMzM1NjJMNi45OTk3OCA4LjQyNzI4TDEwLjA4NTYgNS4zNDE0NUMxMC4xOTcyIDUuMjQ1ODggMTAuMzQwOCA1LjE5NTk1IDEwLjQ4NzYgNS4yMDE2MkMxMC42MzQ0IDUuMjA3MjkgMTAuNzczNiA1LjI2ODE1IDEwLjg3NzUgNS4zNzIwNEMxMC45ODE0IDUuNDc1OTMgMTEuMDQyMyA1LjYxNTE5IDExLjA0NzkgNS43NjJDMTEuMDUzNiA1LjkwODgxIDExLjAwMzcgNi4wNTIzNiAxMC45MDgxIDYuMTYzOTVMNy40MDgxMSA5LjY2Mzk1QzcuMjk5NDYgOS43NzE3MiA3LjE1MjgxIDkuODMyNDcgNi45OTk3OCA5LjgzMzEyWiIgZmlsbD0iIzU2NTg1QSIvPgo8L3N2Zz4K) center center no-repeat;
          width: 14px;
          height: 14px;
          border: none;
          line-height: unset !important;
          margin-top: -5px;
          margin-left: -12px;
        }
      }


    }

    .select2-dropdown {
      background-color: transparent !important;
      border: none;
      border-radius: 0 0 8px 8px;
      overflow: hidden;
      z-index: 9999999999 !important;

      .select2-search__field {
        line-height: 32px;
        padding: 0 16px;
        border: none !important;
        margin: 4px auto 0;
        display: block;
      }
    }

    .select2-results__options {

      li {
        color: $white-color !important;

        &:hover {
          background-color: $primary-medium-color;
        }

        &.select2-results__option--highlighted {
          background-color: $primary-medium-color;
        }
      }
    }
  }

  #TB_closeWindowButton {
    top: 16px;
    right: 16px;

    .rtl & {
      left: 16px;
      right: unset;
    }
  }

  .tb-close-icon, #TB_closeWindowButton {
    width: 21px;
    height: 21px;
  }

  #TB_title {
    background: #ffffff;
    border-bottom: none;
    box-sizing: border-box;
    height: unset;

    .rtl & {
      text-align: right;
    }
  }

  #TB_ajaxWindowTitle {
    color: #0C0C0D;
    font-size: 20px;
    font-weight: 500;
    line-height: 23.44px;
    padding: 0;
    width: 100%;
  }

  .tb-close-icon:before {
    content: '';
    width: 20px;
    height: 20px;
    display: inline-block;
    background: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGc+CjxwYXRoIGQ9Ik05LjY5MzYxIDEwLjVMNS4yNSA2LjA1NjRMNi4wNTY0IDUuMjVMMTAuNSA5LjY5MzU3TDE0Ljk0MzYgNS4yNUwxNS43NSA2LjA1NjRMMTEuMzA2NCAxMC41TDE1Ljc1IDE0Ljk0MzZMMTQuOTQzNiAxNS43NUwxMC41IDExLjMwNjRMNi4wNTY0IDE1Ljc1TDUuMjUgMTQuOTQzNkw5LjY5MzYxIDEwLjVaIiBmaWxsPSIjMEMwQzBEIi8+CjwvZz4KPC9zdmc+Cg==") center center no-repeat;
    opacity: 80%;
  }

  .tb-close-icon:hover {
    &:before {
      opacity: 1;
    }
  }

  form {
    margin: 0;

    .wps-tb-window-footer,
    .wps-filter-reset,
    .wps-filter-filter {
      width: 100%;
      display: flex;
      gap: 16px;
      margin-top: 12px;
      justify-content: flex-end;


      .wps-reset-filter {
        padding: 12px 16px;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        line-height: 16.41px;
        color: #56585A;
        background: #F5F6FE;
        border: none;
        outline: none;

        &:disabled {
          opacity: 50%;
          cursor: default;
          pointer-events: none;
        }

        &:hover {
          background: #12121B0F;

          &:disabled {
            opacity: 50%;
            background: #F5F6FE;
          }
        }
      }

      .button-primary {
        font-weight: 500 !important;
        font-size: 14px;
        line-height: 16.41px !important;
        padding: 12px 16px;
        border-radius: 4px;
        background-color: #404bf2;
        text-shadow: none;
        height: auto;
        transition: .2s;
        box-shadow: none;
        border: none;
        color: #fff;
        min-width: 90px;

        &:hover {
          background-color: #1e27bf;
        }

        &.loading, &.loading:hover {
          background: #F1F1F9;
          color: #B2B2CF;
          display: inline-flex;
          font-size: 13px;
          font-weight: 500;
          line-height: 15.23px;
          gap: 8px;
          align-items: center;
          pointer-events: none;

          &:before {
            content: "";
            display: inline-block;
            width: 12px;
            height: 12px;
            animation: wps-spin 5s infinite;
            background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMuNjQxNzUgMi45NTM3OEM0LjgxMDQxIDEuOTQzMjggNi4zMzM4NCAxLjMzMjAzIDguMDAwMDQgMS4zMzIwM0MxMS42ODE5IDEuMzMyMDMgMTQuNjY2NyA0LjMxNjggMTQuNjY2NyA3Ljk5ODdDMTQuNjY2NyA5LjQyMjc2IDE0LjIyMDIgMTAuNzQyNiAxMy40NTk1IDExLjgyNThMMTEuMzMzNCA3Ljk5ODdIMTMuMzMzNEMxMy4zMzM0IDUuMDUzMTggMTAuOTQ1NiAyLjY2NTM2IDguMDAwMDQgMi42NjUzNkM2LjU2NjU5IDIuNjY1MzYgNS4yNjUyMiAzLjIzMDg4IDQuMzA2ODYgNC4xNTA5OEwzLjY0MTc1IDIuOTUzNzhaTTEyLjM1ODMgMTMuMDQzNkMxMS4xODk2IDE0LjA1NDEgOS42NjYyNCAxNC42NjU0IDguMDAwMDQgMTQuNjY1NEM0LjMxODE0IDE0LjY2NTQgMS4zMzMzNyAxMS42ODA2IDEuMzMzMzcgNy45OTg3QzEuMzMzMzcgNi41NzQ2IDEuNzc5OSA1LjI1NDggMi41NDA1NyA0LjE3MTY2TDQuNjY2NzEgNy45OTg3SDIuNjY2NzFDMi42NjY3MSAxMC45NDQyIDUuMDU0NTIgMTMuMzMyIDguMDAwMDQgMTMuMzMyQzkuNDMzNTEgMTMuMzMyIDEwLjczNDggMTIuNzY2NSAxMS42OTMyIDExLjg0NjRMMTIuMzU4MyAxMy4wNDM2WiIgZmlsbD0iI0IyQjJDRiIvPgo8L3N2Zz4K) center center no-repeat;
            background-size: 100%;
          }

        }
      }
    }
  }

  .wps-modal-filter-description {
    color: #56585A;
    font-size: 14px;
    font-weight: 400;
    line-height: 16.41px;
    padding: 0;
    margin: 0;
  }

  .wps-filter-footer {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    margin-top: 12px;
    gap: 16px;

    .wps-filter-item {
      width: auto;
    }
  }

  #wps-visitors-filter-form, .wps-modal-filter-form {
    padding: 0;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;

    .wps-filter-item {
      display: flex;
      flex-direction: column;
      gap: 8px;

      .rtl & {
        text-align: right;
      }

      &.wps-filter-page {
        display: none;
      }
    }

    table {
      width: 100%;
      position: relative;
      table-layout: fixed;
    }

    tr:nth-child(even) {
      td {
        padding-bottom: 12px;
      }
    }

    tr:nth-child(odd) {
      td {
        padding-bottom: 8px;
      }
    }

    tr:last-child {
      td {
        padding-bottom: 0;
      }
    }

    td {
      font-size: 13px;
      color: #0C0C0D;
      font-weight: 400;
      line-height: 15.23px;
    }

    input {
      height: 32px;
      line-height: 32px !important;
      font-size: 14px;
      letter-spacing: .05rem;
      padding: 0 12px;
      border: 1px solid #dadce0 !important;
      border-radius: 2px;

      &:focus {
        box-shadow: none;
        outline: none;
        border-color: $primary-color;
      }
    }


  }
}

.select2-search--dropdown .select2-search__field {
  padding: 0 12px !important;
  line-height: 36px !important;
  min-height: 32px;
  border-radius: 2px;

  &:focus {
    box-shadow: none;
    outline: none;
    border-color: $primary-color;
  }
}

#TB_window ~ .select2-container, #TB_window .select2-container {
  &.select2-container--default {

    &.select2-container--open:not(.select2) {
      max-width: calc(100% - 48px);
    }

    .select2-results__option--selected,
    .select2-results__option.select2-results__option--selected {
      background: #E3E4E5 !important;
      color: #404BF2 !important;
    }

    .select2-results__option.select2-results__option--selected:hover {
      background: #DDDEE0 !important;
      color: #404BF2;
    }

    .select2-results__options {
      &::-webkit-scrollbar {
        width: 4px;
        border-radius: 2px;
      }

      &::-webkit-scrollbar-track {
        width: 4px;
        background: #FAFAFB;
      }

      &::-webkit-scrollbar-thumb {
        background-color: #DADCE0;
      }

    }

    .select2-results__option:hover, .select2-results__option--highlighted[aria-selected] {
      background: #EEEFF1;
      color: #0C0C0D;
      font-weight: 400;
    }

    .select2-search--dropdown .select2-search__field {
      border: 1px solid #EEEFF1;
      padding: 8px !important;
      border-radius: 3px;
      font-size: 14px;
      line-height: 24px !important;
      height: 40px;
    }

    .select2-results__option {
      padding: 7px 12px;
      color: #56585A;
      font-size: 14px;
      font-weight: 400;
      line-height: 24px;
      margin-bottom: 0;

      .wps-modal-filter-icon {
        display: flex;
        align-items: center;
        gap: 6px;
        height: 24px;

        img {
          max-height: 15px;
          object-fit: contain;
        }
      }
    }

    .select2-dropdown {
      box-shadow: 4px 4px 15px 0 #0000001A;
      border: 1px solid #DADCE0;
      border-radius: 3px;

      &.select2-dropdown--below {
        margin-top: 8px;
      }
    }

    .select2-dropdown select2-dropdown--below {
      margin-top: 8px;
      border: 1px solid #DADCE0;
      border-radius: 3px;
    }

    .select2-search--dropdown {
      display: block;
      padding: 7px;
    }

  }
}

ul, span {
  &[id^="select2-location-"] {
    .wps-modal-filter-icon {
      img {
        border-radius: 2px;
      }
    }
  }
}

.wps-modal-filter-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px !important;

  img {
    max-height: 14px;
    object-fit: contain;
  }
}