// RTL Compatibility
body.rtl {
  .ins-cart-coupon {
    .coupon {
      flex-direction: row-reverse !important;
    }
  }
}

// Divi Theme Compatibility
.theme-Divi {
  .ins-up-sells {
    .ins-sell-add-to-cart {
      border: none !important;
      font-size: 16px !important;
      line-height: 1.3 !important;
      color: var(--ins_checkout_theme) !important;
      &:after {
        font-size: 18px;
        line-height: 1.3 !important;
      }
    }
  }
}
// Blocksy Theme Compatibility
.ins-cart-item-quantity {
  .ct-increase,
  .ct-decrease {
    display: none !important;
  }
  div.quantity[data-type] input[type="number"] {
    padding: 0px !important;
  }
}

// Woodmart Theme Compatibility
.theme-woodmart {
  .ins-product-sell-carousel .owl-nav {
    display: none;
    visibility: hidden;
  }
  .ins-cart-coupon .coupon button {
    padding: 0 !important;
  }
  .ins-cart-inner.shipping .woocommerce-billing-fields > div p input,
  .ins-cart-inner.shipping .woocommerce-billing-fields > div p select {
    height: auto !important;
  }
  .ins-cart-inner.shipping .woocommerce-billing-fields > div p textarea {
    min-height: auto !important;
  }
}

// OceanWP Theme Compatibility
.theme-oceanwp {
  .ins-cart-item-quantity .quantity {
    min-width: 34px !important;
  }
  .ins-cart-inner.shipping .woocommerce-billing-fields > div p select {
    height: auto !important;
    min-height: auto !important;
  }

  .ins-checkout-popup {
    .ins-checkout-layout {
      .ins-content {
        .ins-cart-inner {
          .woocommerce-cart-form {
            .ins-cart-footer-wrap {
              .ins-cart-collaterals {
                .cart_totals {
                  &.calculated_shipping {
                    h2 {
                      background-color: transparent !important;
                      border: none !important;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

// Betheme Theme Compatibility
.theme-betheme {
  .ins-step-icon,
  .ins-step-title {
    display: inline-block;
    line-height: 46px !important;
  }
  .ins-checkout-steps-wrap > div {
    padding: 0px !important;
  }
  .ins-cart-item-quantity .quantity {
    width: 34px !important;
  }
  .woocommerce .quantity .qty {
    padding: 0 !important;
  }
  .ins-checkout-modern .plus.ins-cart-plus,
  .ins-checkout-modern .minus.ins-cart-minus {
    display: block !important;
    visibility: visible;
  }
  .ins-cart-inner.shipping .woocommerce-billing-fields > div p,
  .ins-cart-inner.shipping .woocommerce-shipping-fields > div p {
    flex-basis: calc(100% / 2 - 14px) !important;
  }
  .ins-cart-inner.shipping .woocommerce-billing-fields > div p textarea {
    width: 100% !important;
  }
  .ins-payment-wrap .ins-cart-content-wrap {
    width: auto !important;
  }
}

// Avada Theme Compatibility
.theme-Avada {
  .ins-checkout-layout.popup .woocommerce-cart-form {
    display: block !important;
  }
  .ins-checkout-modern.popup .ins-checkout-layout.popup {
    max-width: 50%;
  }

  .ins-checkout-popup h3 {
    font-size: 19px !important;
    font-weight: 600;
    margin: 0 !important;
  }

  .ins-checkout-popup {
    .ins-checkout-layout {
      .ins-content {
        .ins-checkout {
          .ins-cart-inner {
            #customer_details {
              .ins-cart-content-inner {
                .ins-cart-content-wrap {
                  .fusion-button {
                    display: none !important;
                  }
                  .woocommerce-billing-fields{
                    .fusion-responsive-typography-calculated{
                      margin-bottom: 20px;
                    }
                    .woocommerce-billing-fields__field-wrapper{
                      .address-field{
                        .woocommerce-input-wrapper{
                          .select-arrow{
                            background: transparent;
                            width: 20px !important;
                            height: 20px !important;
                            position: absolute;
                            color: black;
                            top: 50%;
                            right: 6px;
                            transform: translateY(-50%);
                            display: flex;
                            align-items: center;
                          }
                          .select-arrow{
                            background-color: transparent !important;
                          }
                        }
                      }
                      
                    }
                  }
                }
              }
            }
            &.payment {
              .ins-payment-wrap {
                .ins-cart-content-wrap {
                  .ins-cart-summery {
                    #order_review {
                      display: block !important;
                    }
                    #payment {
                      ul {
                        margin-top: 15px !important;
                      }
                      li {
                        margin: 0 !important;
                        .payment_box {
                          padding: 0 20px !important;
                          margin: 0 !important;
                          p {
                            margin: 0 !important;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        .ins-cart-inner {
          .woocommerce-cart-form {
            .ins-checkout-body {
              .ins-cart-content-wrap {
                .ins-single-cart-wrap {
                  .woocommerce-content-box {
                    h2 {
                      display: none !important;
                    }
                    .ins-single-cart-item {
                      .ins-cart-item-quantity {
                        .quantity {
                          border: none !important;
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
      .ins-single-layout-wrap {
        .ins-content {
          &.ins-show {
            height: auto !important;
          }
          margin-top: 10px;
        }
        .ins_single_layout_checkout_area {
          .ins-checkout {
            .ins-cart-inner {
              #customer_details {
                .ins-cart-content-inner {
                  .ins-cart-content-wrap {
                    h3 {
                      font-size: 19px;
                      font-weight: 600;
                      margin: 0 !important;
                      margin-bottom: 5px !important;
                    }

                    .fusion-button {
                      display: none !important;
                    }
                  }
                }
              }
              &.payment {
                .ins-payment-wrap {
                  .ins-cart-content-wrap {
                    .ins-cart-summery {
                      #order_review {
                        display: block !important;
                      }
                      #payment {
                        ul {
                          margin-top: 15px !important;
                        }
                        li {
                          margin: 0 !important;
                          .payment_box {
                            padding: 0 20px !important;
                            margin: 0 !important;
                            p {
                              margin: 0 !important;
                            }
                          }
                        }
                      }
                    }
                  }
                }
                .ins-cart-btns {
                  &.ins_single_layout_btn {
                    background: transparent !important;
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

@media (max-width: 1140px) {
  .theme-Avada {
    .ins-checkout-modern.popup .ins-checkout-layout.popup {
      max-width: 80% !important;
    }
  }
}

// Flatsome Theme Compatibility
.theme-flatsome {
  .ins-checkout-popup {
    .button,
    button,
    input[type="button"],
    input[type="reset"],
    input[type="submit"] {
      margin: 0;
      text-transform: unset;
    }
    .ins-checkout-layout {
      .ins-content {
        .ins-cart-inner {
          .woocommerce-cart-form {
            .ins-cart-footer-wrap {
              .ins-cart-footer-content {
                .ins-footer-cart-button {
                  .ins-cart-coupon {
                    .continue-shopping {
                      display: none;
                    }
                  }
                }
                .ins-cart-collaterals {
                  .cart_totals {
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
