$green: #0f834d;
$red: #e2401c;

%blackBtn {
  padding: 0 15px;
  display: inline-block;
  /*margin: 0 0 5px 0;*/
  margin: 0;
  line-height: 34px;
  /*min-width: 136px;
  background-color: #333333;
  border-color: #333333;
  color: #ffffff;*/
  text-decoration: none;
  text-align: center;
  border: none;
  font-size: 12px;
  font-weight: 600;
}

%iconElement {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  vertical-align: middle;
  font-style: normal;
  font-variant: normal;
  font-family: "Font Awesome 5 Free";
  font-family: "fontello";
  font-weight: 900;
  line-height: inherit;
  vertical-align: middle;
}

@font-face {
  font-family: "fontello";
  src: url("./font/fontello.eot?39201872");
  src: url("./font/fontello.eot?39201872#iefix") format("embedded-opentype"),
    url("./font/fontello.woff?39201872") format("woff"),
    url("./font/fontello.ttf?39201872") format("truetype"),
    url("./font/fontello.svg?39201872#fontello") format("svg");
  font-weight: normal;
  font-style: normal;
}

#ptholder {
  width: 100%;
  max-width: 100%;

  * {
    box-sizing: border-box;
  }

  .product-table-wrap {
    position: relative;

    .product-cart-wrapper {
      .button {
        @extend %blackBtn;
      }

      .quantity {
        display: flex;
        margin-right: 5px;

        &.buttons_added {
          margin-bottom: 5px;
          min-width: 111px;
        }
      }
    }

    ins {
      padding: 0;
      text-decoration: none;
    }

    .instock,
    .in-stock,
    .out-of-stock {
      font-size: 14px;
      font-family: inherit;

      &::before {
        @extend %iconElement;
        margin-right: 5px;
      }
    }

    .instock,
    .in-stock {
      color: $green;

      &:before {
        content: "\f118";
      }
    }

    .out-of-stock {
      color: $red;

      &:before {
        content: "\f119";
      }
    }

    .wcpt-selected-cart-wrapper {
      .wcpt-selected-cart {
        @extend %blackBtn;
        height: auto;
        line-height: normal;
        padding-top: 10px;
        padding-bottom: 10px;
        max-width: fit-content;
        /*width: 120px;*/
        word-break: normal;
        margin-left: auto;

        & + span {
          margin-top: 5px;
        }
      }

      text-align: right;
      display: flex;
      justify-content: flex-end;
      flex-direction: column;
      text-align: right;

      a {
        width: fit-content;
        width: -moz-fit-content;
        margin-right: 0 !important;
      }
    }

    .dataTables_wrapper {
      margin-top: 15px;
      .dtr-details {
        width: 100%;
        li .dtr-data .product-cart-wrapper .cart {
          max-width: none;
        }
      }

      .wcpt-selected-cart-wrapper {
        margin-bottom: 20px;
      }

      .dataTables_filter {
        margin-bottom: 15px;
        text-align: left;
        display: flex;
        align-items: center;
        font-size: 14px;

        label {
          display: flex;
          align-items: center;
          white-space: nowrap;
        }

        input[type="search"] {
          height: 32px;
          background-color: #f2f2f2;
          color: #43454b;
          border: 0;
          margin-left: 0;
          -webkit-appearance: none;
          box-sizing: border-box;
          font-weight: normal;
          margin-left: 5px;
          box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.125);
        }
      }

      .dataTables_length {
        font-size: 14px;

        label {
          display: block;
          line-height: 34px;
        }

        select {
          height: 34px;
          border: 1px solid #ddd;
          background: #f2f2f2;
          margin: 0 5px;
          padding: 0 5px;
        }
      }

      .product-table {
        font-size: 14px;
        margin-bottom: 30px;
        top: 15px;
        position: relative;
      }

      .dataTables_info {
        margin-bottom: 15px;
        padding: 0;
        line-height: 30px;
        font-size: 12px;
      }

      .dataTables_paginate {
        padding: 0;
        margin-bottom: 15px;
        font-size: 12px;

        .paginate_button {
          padding: 0.1em 0.6em;
        }
      }

      .variations {
        select {
          height: 34px;
          border: 1px solid #ddd;
          padding: 0 8px;
          margin-bottom: 5px;
          font-size: 12px;
          border-radius: 0;
        }

        .reset_variations {
          display: none;
        }

        & + .single_variation_wrap {
          margin-top: 5px;
        }
      }
    }
  }

  table.product-table.dataTable .added_to_cart,
  .wcpt-selected-cart-wrapper .added_to_cart {
    background: none;
    color: #333;
    padding: 0;
    width: auto;
    min-width: 0;
    /*width: 100%;*/
    text-align: right;
    font-size: 14px;
    font-weight: 600;
    margin-left: auto;
    margin-top: 5px;

    &:after {
      @extend %iconElement;
      content: "\f178";
      margin-left: 0.5em;
    }
  }

  .product-table-filter-cart-wrapper {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 12px;
  }

  @media screen and (min-width: 768px) {
    /*.product-table-filter-cart-wrapper {
      .wcpt-selected-cart-wrapper,
      .wc-product-table-select-filters {
        flex-basis: 100%;
      }
    }*/
  }

  @media screen and (max-width: 767px) {
    .product-table-filter-cart-wrapper {
      flex-wrap: wrap;

      .wcpt-selected-cart-wrapper

      /*,
      .wc-product-table-select-filters*/
 {
        flex-basis: 100%;
      }
    }
  }

  .wc-product-table-select-filters {
    margin: 15px 0 10px;
    line-height: 34px;
    display: flex;

    .filter-attr {
      height: 34px;
      /*padding: 0 10px;
      margin: 0 3px 6px;*/
      font-size: 14px;
    }

    .reset-filters {
      white-space: nowrap;
      margin-left: auto;
      align-self: baseline;
      box-shadow: none;
      text-decoration: none;
      margin-right: 10px;

      &:before {
        background: url(../../../assets/imgs/reset.png) center (center / cover)
          no-repeat;
        margin-right: 0.5em;
        vertical-align: baseline;
        position: relative;
        top: 1px;
        display: inline-block;
        content: "";
        width: 13px;
        height: 13px;
      }
    }
  }

  .wc-product-table-select-filter {
    margin-right: 15px;
    display: flex;

    > label {
      padding-right: 10px;
    }
  }

  .wcpt-selected-cart-wrapper .wcpt-added-products {
    color: #155724;
    font-weight: 600;
    padding: 0;
    margin-bottom: 14px;
    margin-top: 0.5rem;

    & + .added_to_cart.wc-forward {
      display: block;
    }
  }

  table.product-table.dataTable.dtr-inline.collapsed
    > tbody
    > tr[role="row"]
    > {
    td:first-child:before,
    th:first-child:before {
      top: calc(50% - 9px);
    }
  }

  .wc-product-table-select {
    display: flex;
    flex-wrap: wrap;

    select {
      height: 34px;
      border: 1px solid #ddd;
      padding: 0 12px;
      margin: 0 3px 5px;
    }
  }

  .product-table-wrap {
    .dataTables_wrapper {
      .variations .reset_variations {
        /*margin: 0 0 15px;*/
        margin: 5px 0;
        font-size: 12px;
      }

      .woocommerce-variation-description p {
        font-size: 14px;
        line-height: normal;
        margin-bottom: 15px;
      }

      .woocommerce-Price-amount {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 5px;
        display: block;
        white-space: nowrap;
        color: #333;
      }
    }

    .wcpt-selected-cart-wrapper {
      margin-top: 15px;
    }
  }

  table.product-table.dataTable {
    tbody {
      th,
      td {
        padding: 8px 10px;
        border-top: 1px solid #eee;
      }

      td:first-child {
        padding-left: 30px;
      }
    }

    img {
      width: 70px;
      height: auto;
    }

    .product-cart-wrapper {
      align-items: baseline;
      justify-content: space-between;

      .status-product {
        display: none;
      }

      .product-cart-chechbox {
        /*margin-right: 5px;*/
        margin-right: 0;
      }

      display: flex;
      flex-wrap: wrap;

      .cart {
        display: flex;
        .single_add_to_cart_button:first-child {
          line-height: normal;
          white-space: normal;
          padding: 5px 5px 7px;
        }
        .quantity + .single_add_to_cart_button {
          white-space: nowrap;
          border-radius: 0;
          height: 34px;
        }

        button {
          @extend %blackBtn;
          /*margin-top: 5px;*/
        }

        &.variations_form {
          /*text-align: right;*/

          select {
            margin-bottom: 0;
            margin-top: 5px;
            width: 100%;
          }

          .reset_variations {
            color: darkred;
            text-decoration: none;
            box-shadow: none;

            &::before {
              content: "\02A2F";
              font-size: 12px;
              color: darkred;
              position: relative;
              top: 1px;
            }
          }
        }
      }

      &:only-child {
        width: 100%;
        flex-basis: 100%;
        flex-wrap: nowrap;
        font-size: 12px;
      }
    }

    .product-cart-chechbox-wrapper {
      display: flex;
      align-items: flex-end;

      .cart {
        margin-bottom: 10px;
        margin-right: 10px;
        /*min-width: 195px;        
        width: 195px;*/
        max-width: 195px;
        min-width: 170px;
        flex-wrap: wrap;
        /*flex-wrap: nowrap;*/

        /*justify-content: flex-end;*/
      }

      .stock {
        display: none;
      }
    }

    .dtr-data {
      .product-cart-chechbox-wrapper {
        .cart {
          max-width: 180px;
        }
      }
    }

    .single_variation_wrap {
      display: flex;
      flex-wrap: wrap;
    }

    .product_type_external {
      padding: 5px 10px;
      line-height: normal;
      border-radius: 0;
    }

    td a {
      display: inline-block;
      vertical-align: middle;
      white-space: normal;
      word-break: initial;
    }
  }

  @media screen and (max-width: 767px) {
    .dataTables_wrapper {
      .dataTables_info,
      .dataTables_paginate {
        text-align: left;
      }
    }
  }

  @media screen and (max-width: 640px) {
    .product-table-filter-cart-wrapper {
      flex-direction: column-reverse;
    }

    .wcpt-selected-cart-wrapper {
      width: 100%;
    }

    .dataTables_wrapper {
      .dataTables_length,
      .dataTables_filter {
        text-align: left;
        font-size: 12px;
      }
    }
  }

  .product-table-loader {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.7);
  }

  .no-product-added {
    color: red;
    font-weight: bold;
  }

  table.dataTable {
    td,
    th {
      word-break: normal;

      &[data-name="cart_button"] {
        &:not(:last-child) {
          width: 182px !important;
          padding: 10px !important;
        }
      }

      &:last-child {
        width: 135px !important;

        .quantity {
          /*margin: 0 0 5px 0;*/
          margin: 0 5px 0 0;
        }
      }

      &[data-name="id"] {
        width: 50px !important;
      }
    }

    > tbody > tr.child span.dtr-title {
      margin-bottom: 5px;
    }

    &.nowrap th[class*="sorting"] .sorting-btns {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      margin: 0 10px;
      vertical-align: middle;

      .sorting-asc,
      .sorting-des {
        margin: 1px;
        display: block;
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
      }

      .sorting-asc {
        border-bottom: 6px solid #ccc;
      }

      .sorting-des {
        border-top: 6px solid #ccc;
      }
    }
  }

  /* --------------------------------------------------
    Spin Loader 
-------------------------------------------------- */

  .spinner-loader {
    position: absolute;
    top: calc(50% - 16px);
    left: calc(50% - 16px);
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid #999;
    width: 32px;
    height: 32px;
    -webkit-animation: spin 2s linear infinite;

    /* Safari */
    animation: spin 2s linear infinite;
  }

  /* Safari */
  @-webkit-keyframes spin {
    0% {
      -webkit-transform: rotate(0deg);
    }

    100% {
      -webkit-transform: rotate(360deg);
    }
  }

  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }

    100% {
      transform: rotate(360deg);
    }
  }

  /* --------------------------------------------------
    New Edits
-------------------------------------------------- */

  .wcpt-selected-cart-wrapper
    .wcpt-added-products
    .product-cart-chechbox-wrapper
    .product-cart-wrapper
    .stock.in-stock {
    display: none;
  }

  .cart .quantity .qty,
  .cart .quantity .tribe-ticket-quantity {
    max-width: 45px;
    padding: 10px 5px;
    height: 34px;
    /*margin-top: 5px;*/
  }

  .single_variation_wrap .variations_button,
  .cart {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;

    .quantity {
      align-items: center;
      flex-wrap: wrap;
      margin: 0 0 5px !important;
      float: none !important;
      border: none;

      & + .single_add_to_cart_button {
        margin-left: 5px !important;
      }

      input:not(.minus):not(.minus) {
        margin: 0 -1px;
        border-radius: 0;
        border: 1px solid #ccc;
        min-height: 0;
      }

      .plus,
      .minus {
        border-radius: 0;
        border: 1px solid #ccc !important;
        background: #f2f2f2 !important;
        color: #999 !important;
        font-size: 12px !important;
        line-height: 34px !important;
        min-width: 34px;
        vertical-align: top;
        float: none !important;
        max-width: 34px;
        height: 34px;
        padding: 0px !important;
        margin: 0 !important;
      }
    }
  }
  .single_variation_wrap .variations_button {
    flex-wrap: nowrap;
  }
}
