/* Sales price uses the actual sellable unit, with the calculated summary near quantity. */
.abpp-primary-unit{font-size:.7em;font-weight:400;white-space:nowrap;vertical-align:baseline}
.abpp-from{font-size:.8em;font-weight:400;margin-right:.2em}
form.cart .abpp-panel{clear:both;display:block;width:100%;margin:10px 0 16px;font-size:14px;line-height:1.65}
form.cart .abpp-panel[style*="display:none"]{display:none!important}
.abpp-detail{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin:3px 0;flex-wrap:wrap}
.abpp-detail>span:first-child{opacity:.8}
.abpp-detail>strong{font-weight:600}
.abpp-totals{margin-top:6px}

.abpp-sell-label{font-weight:600;margin:0 0 6px;line-height:1.5}
.abpp-purchase-price,.abpp-primary-price{white-space:normal}

/* Allow decimal purchase steps (e.g. 1.38, 12.42, 123.456) to remain readable in Divi/BodyCommerce quantity controls. */
body.single-product form.cart .quantity { min-width: 112px; width: auto; max-width: none; overflow: visible; }
body.single-product form.cart .quantity input.qty,
body.single-product form.cart input.qty {
  box-sizing: border-box; width: 112px !important; min-width: 112px !important;
  max-width: none !important; height: 44px; min-height: 44px;
  font-size: 16px !important; line-height: 1.3;
  text-align: center; padding: 6px 22px 6px 8px !important;
  color: inherit; overflow: visible;
}

/* Number of packages corresponding to the currently selected WooCommerce quantity. */
form.cart .abpp-package-count{display:flex;align-items:baseline;gap:7px;margin:2px 0 8px;font-size:14px;line-height:1.6}
form.cart .abpp-package-count>span{opacity:.8}
form.cart .abpp-package-count>strong{font-weight:700;font-variant-numeric:tabular-nums}

/* Unit inside the quantity field, without changing the numeric input value.
   Reserve a right-side area for both the unit and the native number spinner. */
body.single-product form.cart .quantity.abpp-quantity-with-unit {position:relative;min-width:154px;width:max-content;}
body.single-product form.cart .quantity.abpp-quantity-with-unit input.qty {
  width:154px!important;min-width:154px!important;max-width:none!important;
  text-align:left!important;padding:6px 66px 6px 13px!important;
  font-variant-numeric:tabular-nums;
}
body.single-product form.cart .quantity .abpp-qty-unit {
  position:absolute;right:24px;top:50%;transform:translateY(-50%);
  font-size:12px;line-height:1;white-space:nowrap;pointer-events:none;
  color:inherit;opacity:.7;z-index:2;
}

/* Public styling hooks: each value and label has an independent class. */
.abpp-total-area-row,.abpp-total-price-row{width:100%}
.abpp-total-area-value,.abpp-total-price-value{font-variant-numeric:tabular-nums}
.abpp-package-count-value{font-variant-numeric:tabular-nums}

/* Product quantity and calculated package count, kept in the same row. */
body.single-product form.cart .abpp-quantity-group {
  display:inline-flex;align-items:center;gap:12px;flex-wrap:wrap;max-width:100%;vertical-align:middle;
}
body.single-product form.cart .abpp-quantity-group .quantity {float:none;margin:0!important;}
body.single-product form.cart .abpp-quantity-group .abpp-package-count {
  display:flex;flex-direction:column;justify-content:center;align-items:flex-start;
  gap:2px;margin:0;padding:5px 13px;border:1px solid #d8d8d8;min-height:44px;
  box-sizing:border-box;line-height:1.35;
}
body.single-product form.cart .abpp-total-area-row {clear:both;justify-content:flex-start;gap:7px;margin:8px 0 12px;font-size:14px;}
/* Classic WooCommerce cart. Keep the actual input numeric and editable. */
.woocommerce-cart .abpp-cart-quantity {display:inline-flex;flex-direction:column;align-items:center;gap:4px;max-width:100%;}
.woocommerce-cart .abpp-cart-qty-field {display:inline-flex;align-items:center;gap:6px;max-width:100%;}
.woocommerce-cart .abpp-cart-qty-field .quantity {margin:0!important;float:none;}
.woocommerce-cart .abpp-cart-qty-field input.qty {min-width:80px;width:100px!important;max-width:100%;}
.woocommerce-cart .abpp-cart-qty-unit,.woocommerce-cart .abpp-cart-package-count {font-size:12px;white-space:nowrap;}

/* Fixed coverage above quantity, dynamic coverage in the totals panel. */
form.cart .abpp-sales-info {clear:both;display:block;width:100%;margin:8px 0 12px;font-size:14px;line-height:1.55;}
form.cart .abpp-sales-info .abpp-sell-label {margin:0 0 2px;}
form.cart .abpp-coverage {font-size:14px;}
body.single-product form.cart .abpp-totals .abpp-total-area-row {justify-content:space-between;margin:3px 0;}
.abpp-mini-marker[hidden] {display:none!important;}
.abpp-mini-unit,.abpp-mini-packages {white-space:nowrap;}
