/* Keep WooCommerce in charge of inputs, buttons and quantity updates. */
.odg-quantity-with-unit {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.odg-quantity-with-unit > .quantity { margin: 0; }
.odg-quantity-unit {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
}
/* Native Blocks row class is provided by registerCheckoutFilters. */
.odg-has-quantity-unit .wc-block-cart-item__quantity {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 6px 8px;
    align-items: center;
}
.odg-has-quantity-unit .wc-block-cart-item__quantity::before {
    content: var(--odg-quantity-unit);
    grid-column: 2;
    grid-row: 1;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.odg-has-quantity-unit .wc-block-cart-item__quantity > .wc-block-components-quantity-selector {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
}
.odg-has-quantity-unit .wc-block-cart-item__quantity > .wc-block-cart-item__remove-link {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
}
/* Standard Checkout Blocks use a count badge instead of an editable stepper.
   Put the unit with that count without overlapping the product description. */
.odg-has-quantity-unit .wc-block-components-order-summary-item__quantity {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
    height: auto;
    padding: 2px 6px;
    margin-bottom: 4px;
    border-radius: 12px;
    white-space: normal;
}
.odg-has-quantity-unit .wc-block-components-order-summary-item__quantity::after {
    content: var(--odg-quantity-unit);
    font-size: 12px;
    line-height: 1.3;
    min-width: 0;
    overflow-wrap: anywhere;
}
