/* Reuse Product Table Lite's own quantity controls and validation. */
.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):not(.savia-cd-native):has(> input.qty:enabled:not([readonly])) {
  --savia-qty-height: 42px;
  --savia-qty-edge: 32px;
  --savia-qty-field: 42px;
  display: inline-flex !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: var(--savia-qty-height) !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 1px solid #abc594 !important;
  border-radius: 7px !important;
  background: #fff !important;
  box-shadow: none !important;
  vertical-align: middle;
  direction: ltr;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-qty-controller {
  display: inline-flex !important;
  position: relative !important;
  inset: auto !important;
  flex: 0 0 var(--savia-qty-edge);
  width: var(--savia-qty-edge) !important;
  height: auto !important;
  align-items: center;
  justify-content: center;
  background: #edf5df !important;
  color: #355b36 !important;
  font: 600 20px/1 system-ui, sans-serif !important;
  touch-action: manipulation;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-minus {
  border-radius: 6px 0 0 6px !important;
  border-right: 1px solid #d4e0c8;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-plus {
  border-radius: 0 6px 6px 0 !important;
  border-left: 1px solid #d4e0c8;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-qty-controller::before {
  content: none;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-minus::after {
  content: "−";
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-qty-controller.wcpt-disabled {
  opacity: .48;
  cursor: not-allowed;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > .wcpt-qty-controller:focus-visible {
  outline: 2px solid #355b36;
  outline-offset: -3px;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > input[type="number"].qty {
  flex: 0 0 var(--savia-qty-field);
  width: var(--savia-qty-field) !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 3px !important;
  border: 0 !important;
  background: #fff !important;
  color: #284e43 !important;
  text-align: center !important;
  appearance: textfield;
}

.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > input.qty::-webkit-inner-spin-button,
.wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) > input.qty::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@media (max-width: 760px) {
  .wcpt .wcpt-table .wcpt-quantity.wcpt-display-type-input:not(.wcpt-disabled):has(> input.qty:enabled:not([readonly])) {
    --savia-qty-height: 44px;
    --savia-qty-edge: 30px;
    --savia-qty-field: 35px;
  }
}
