@keyframes wpc-spinner {
  to {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes wpc-spinner {
  to {
    -webkit-transform: rotate(360deg);
  }
}

@keyframes edtcs-spinner {
  to {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes edtcs-spinner {
  to {
    -webkit-transform: rotate(360deg);
  }
}

.edtcs-ul {
  margin: 0;
  padding: 0;

  .edtcs-li {
    margin: 5px 0;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    &:hover {
      border-color: #2271b1;
      background-color: #fafafa;

      .edtcs-li-head {
        .edtcs-remove {
          background-color: #ff6600;
          color: #fff;
        }

        .data {
          .name {
            &:before {
              color: #2271b1;
            }
          }
        }
      }
    }

    &.disabled {
      opacity: .5;
    }

    &.out-of-stock {
      .name {
        text-decoration: line-through;
      }
    }

    &.edtcs-li-open {
      .edtcs-li-head {
        .data {
          .name {
            &:before {
              content: '\f142';
            }
          }
        }
      }
    }

    .edtcs-li-head {
      padding: 5px 2px;
      min-height: 30px;
      display: flex;
      justify-content: space-between;
      align-items: center;

      > span {
        margin-left: 3px;
        margin-right: 3px;
      }

      .move {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
        line-height: 30px;
        border-radius: 2px;
        text-align: center;
        background-color: #eee;
        cursor: move;

        &:before {
          content: '\f545';
          font-family: dashicons;
          font-size: 10px;
          color: #999999;
        }
      }

      .img {
        width: 30px;
        flex: 0 0 30px;

        img {
          width: 30px;
          height: 30px;
          border-radius: 4px;
          display: block;
        }
      }

      .data {
        flex-grow: 1;
        cursor: pointer;

        .name {
          font-weight: 500;

          &:before {
            content: '\f140';
            font-family: dashicons;
            margin-right: 3px;
          }
        }
      }

      .qty, .tag {
        width: 70px;
        flex: 0 0 70px;
      }

      .info {
        font-size: 12px;
        font-style: italic;
        height: 18px;
        line-height: 18px;
        color: #999;
        background-color: #fafafa;
        text-decoration: none;
        padding: 0 6px;
        border-radius: 2px;
      }

      .type {
        font-size: 10px;
        color: #999;
        min-width: 40px;
        text-decoration: none;
        text-align: end;
      }

      .amount {
        display: inline-block;
      }

      del {
        opacity: .5;

        .amount {
          text-decoration: line-through;
        }
      }

      ins {
        text-decoration: none;
      }

      .edtcs-remove {
        width: 30px;
        height: 30px;
        line-height: 30px;
        flex: 0 0 30px;
        border-radius: 2px;
        text-align: center;
        background-color: #eee;
        cursor: pointer;
      }
    }

    .edtcs-li-body {
      display: none;
      padding: 10px;
      border-top: 1px dashed #c3c4c7;
      background-color: #ffffff;

      &.edtcs-li-body-open {
        display: block;
      }

      .qty_config {
        .qty_config_inner {
          display: flex;
          align-items: center;

          .optional_min_max {
            display: flex;
            align-items: center;
            margin-left: 10px;

            input {
              width: 60px;
              margin: 0 2px;
            }
          }
        }
      }

      .terms_config {
        margin-top: 10px;

        .edtcs_select_multiple {
          width: 100%;
          max-width: 100%;
        }

        .select2-container {
          width: 100% !important;
          max-width: 100% !important;
          float: none !important;
          box-sizing: border-box !important;
          display: inline-block !important;
        }

        .select2-search__field {
          width: auto !important;
          min-height: 24px !important;
          height: 24px !important;
          line-height: 24px !important;
          max-width: 100% !important;
          margin-top: 0 !important;
          border: none !important;
          box-shadow: none !important;
        }

        .select2-container--default .select2-selection--multiple {
          border: 1px solid #c3c4c7;
        }

        .select2-selection__rendered {
          padding: 0 2px !important;
          display: block !important;
        }

        .select2-selection__rendered li {
          height: 24px !important;
          line-height: 22px !important;
          padding-top: 0 !important;
          padding-bottom: 0 !important;
          margin-top: 2px !important;
          margin-bottom: 2px !important;
          margin-right: 2px !important;
        }

        .select2-selection__rendered li:last-child {
          margin-bottom: 0;
        }
      }
    }

    input:not([type="checkbox"]), select {
      width: 100%;
    }

    &.edtcs-li-product-optional {
      .edtcs-li-head {
        .qty {
          input[type=number] {
            background-color: #E8F3FD;
          }
        }
      }
    }
  }
}

.edtcs_results {
  position: absolute;
  width: 100%;
  left: 0;
  top: calc(100% - 1px);
  background-color: #fff;
  padding: 5px 10px;
  margin: 0;
  box-sizing: border-box;
  border: 1px solid #c3c4c7;
  border-radius: 0 0 4px 4px;
  width: 100%;
  height: 100%;
  min-height: 196px;
  z-index: 9999999;
  overflow-y: auto;

  .edtcs-ul {
    .edtcs-li {
      .edtcs-li-head {
        .move, .qty, .data .name:before {
          display: none;
        }

        .type {
          a {
            text-decoration: none;
            color: #999999;
            pointer-events: none;
          }
        }
      }

      .edtcs-li-body {
        display: none !important;
      }
    }
  }
}

.edtcs_selected {
  display: inline-block;
  width: 100%;

  &.edtcs_selected_loading {
    position: relative;

    &:before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      z-index: 10;
      display: block;
      width: 30px;
      height: 30px;
      margin-top: -15px;
      margin-left: -15px;
      border-width: 4px;
      border-style: solid;
      border-radius: 100%;
      border-top-color: rgba(0, 0, 0, .5);
      border-left-color: rgba(0, 0, 0, .1);
      border-bottom-color: rgba(0, 0, 0, .1);
      border-right-color: rgba(0, 0, 0, .1);
      animation: edtcs-spinner 1s linear infinite;
      -webkit-animation: edtcs-spinner 1s linear infinite;
    }

    &:after {
      content: '';
      width: 100%;
      height: 100%;
      background-color: rgba(255, 255, 255, 0.5);
      display: block;
      position: absolute;
      top: 0;
      left: 0;
      z-index: 9;
      pointer-events: none;
    }
  }

  .edtcs-ul {
    .edtcs-li {
      &:last-child {
        margin-bottom: 0;
      }
    }
  }
}

.edtcs-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;

  select {
    max-width: 120px;
  }
}

/* Settings */

#edtcs_regular_price {
  min-width: 60px;
  display: inline-block;
}

#edtcs_settings input[type="search"], #edtcs_settings input[type="text"], #edtcs_settings input[type="number"] {
  font-size: 13px;
  height: 30px;
  line-height: 1;
  float: none;
}

#edtcs_settings .w100 {
  position: relative;
  display: inline-block;
  width: 100%;
}

#edtcs_settings .w100 input:not([type="checkbox"]) {
  width: 100%;
}

#edtcs_settings textarea {
  width: 100%;
  font-size: 13px !important;
}

#edtcs_settings .loading {
  position: absolute;
  right: 10px;
  top: 5px;
  z-index: 998;
}

#edtcs_settings select {
  font-size: 13px;
}

.edtcs_table table {
  width: 100%;
  padding: 10px;
  border-spacing: 0;
  border-collapse: separate;
}

.edtcs_table table tr.edtcs_tr_space th, .edtcs_table table tr.edtcs_tr_space td {
  padding-top: 15px;
}

.edtcs_table table tr th {
  font-size: 12px;
  font-weight: 400;
  text-align: start;
  width: 150px;
}

.edtcs_table table tr td label {
  float: none;
  margin: 0;
  width: auto;
}

.edtcs_table .woocommerce-help-tip {
  margin: 0 !important;
}

#edtcs_set_regular_price, #edtcs_set_sale_price, #edtcs_set_shipping_class {
  cursor: pointer;
}

.edtcs-parent .woocommerce-help-tip, .edtcs-child .woocommerce-help-tip {
  display: none !important;
}

.edtcs_tab a:before {
  content: '\f480' !important;
}

.edtcs-state {
  font-weight: normal;
  font-style: italic;
}

.wpc-premium, .wpc-premium a, .active[data-slug="edgetariff-tools"] .premium a {
  color: #c9356e;
}

.edge_settings_section_none .show_if_section_compatible {
  display: none;
}

.edge_settings_section_compatible .show_if_section_none {
  display: none;
}

.show_if_section_compatible {
  display: none;
}

.edge_settings_section_compatible .show_if_section_compatible {
  display: table-row;
}

/* WPC Dialog */

.ui-dialog.wpc-dialog {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100102;
  background-color: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 0;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .1);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .1);
  color: #3c434a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  font-size: 13px;
  line-height: 1.4em;
}

.ui-dialog.wpc-dialog .ui-dialog-titlebar {
  background: #fcfcfc;
  border-width: 0 0 1px 0;
  border-style: solid;
  border-color: #dfdfdf;
  border-radius: 0;
  height: 36px;
  font-size: 16px;
  font-weight: 600;
  line-height: 36px;
  padding: 0 36px 0 16px
}

.ui-dialog.wpc-dialog .ui-dialog-titlebar .ui-dialog-title {
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  height: 36px;
  line-height: 36px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-dialog.wpc-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close {
  background: 0 0;
  border: none;
  -webkit-box-shadow: none;
  box-shadow: none;
  color: #666;
  cursor: pointer;
  display: block;
  padding: 0;
  margin: 0;
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  outline: none;
  overflow: hidden;
  font-size: 0;
}

.ui-dialog.wpc-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:before {
  font: 400 20px/1 dashicons;
  vertical-align: top;
  speak: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 36px;
  width: 36px;
  height: 36px;
  content: '\f158';
}

.ui-dialog.wpc-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close:hover {
  color: #00a0d2;
}

.ui-dialog.wpc-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close span {
  display: none;
}

.ui-dialog.wpc-dialog .ui-dialog-content {
  padding: 16px;
  overflow: auto;
}

/* Search settings */

#edtcs_search_settings table {
  margin-left: -5px;
  margin-right: -5px;
}

#edtcs_search_settings table th, #edtcs_search_settings table td {
  font-weight: 400;
  text-align: start;
  padding: 5px;
}

#edtcs_search_settings input, #edtcs_search_settings select {
  min-width: 70px;
}

.edtcs_search_settings_updating:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 10;
  display: block;
  width: 30px;
  height: 30px;
  margin-top: -15px;
  margin-left: -15px;
  border-width: 4px;
  border-style: solid;
  border-radius: 100%;
  border-top-color: rgba(0, 0, 0, .5);
  border-left-color: rgba(0, 0, 0, .1);
  border-bottom-color: rgba(0, 0, 0, .1);
  border-right-color: rgba(0, 0, 0, .1);
  animation: edtcs-spinner 1s linear infinite;
  -webkit-animation: edtcs-spinner 1s linear infinite;
}

.edtcs_search_settings_updating:after {
  content: '';
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .05);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  pointer-events: none;
}

