/**
 * WCSB — cart limit, front end
 *
 * Covers ONE control: the cart's quantity "+" once a line is at its cap.
 *
 * Add-to-cart buttons are deliberately not styled here. They were dimmed with
 * pointer-events once, which does not swallow a click — it makes the element
 * transparent to it, so the click landed on the product-card link underneath
 * and navigated to the product page. That read as the button doing nothing.
 * They stay live, and assets/js/wcsb-cart-limit.js intercepts the click and
 * explains instead.
 *
 * The "+" is different: it sits over nothing and is a real <button>, so the
 * script sets the actual disabled attribute. This file only supplies the look.
 *
 * The evov cart-page items widget is why the pointer-events rule below is not
 * merely cosmetic there. Its "+" is a real <button>, like WooCommerce's, and a
 * disabled button dispatches NO click at all — so the script's own gate never
 * ran and the shopper got silence instead of the cap message. FunnelKit's two
 * carts never showed this because their steppers are <div>s, where the
 * disabled attribute does nothing and the click always lands. Giving the evov
 * "+" pointer-events: none puts the click on the stepper box instead, which is
 * not disabled, and the script's geometry fallback then names the cap as it
 * does everywhere else.
 */

/* pointer-events IS used here, unlike on the buttons above, and for a reason
   that does not apply to them: a hover state is the thing being suppressed.
   Dimming alone left the "+" lighting up under the cursor as though it still
   worked. Nothing is lost by it — the button's own parent is the stepper box,
   so the click lands there rather than on anything unrelated, and the script
   falls back to the button's geometry to keep showing the message. */
:is(.quantity, .fkcart-quantity-selector, .wfacp_quantity_selector, .evov-cart-item__qty).wcsb-qty-max :is(.plus, .wd-qty-plus, .fkcart-quantity-up, .wfacp_increase_item, .evov-qty-up) {
	cursor: not-allowed;
	pointer-events: none;
}

/* Fallback dimming at zero specificity, so a theme that already styles disabled
   buttons keeps its own treatment and the control still looks like the rest of
   the site. WoodMart does exactly that — button[disabled] { opacity: .6
   !important } — and this defers to it; without a theme rule, this applies. */
:where(.quantity, .fkcart-quantity-selector, .wfacp_quantity_selector, .evov-cart-item__qty):where(.wcsb-qty-max) :where(.plus, .wd-qty-plus, .fkcart-quantity-up, .wfacp_increase_item, .evov-qty-up) {
	opacity: 0.4;
}

/* FunnelKit's stepper buttons are <div> in both its carts, so they never take
   the disabled attribute the theme styles. They get the dim here directly — at
   normal specificity, since there is no theme rule to defer to. */
.fkcart-quantity-selector.wcsb-qty-max .fkcart-quantity-up,
.wfacp_quantity_selector.wcsb-qty-max .wfacp_increase_item {
	opacity: 0.4;
	cursor: not-allowed;
}

/* The cursor has to be on the BOX, not on the "+".
   `cursor` above can never take effect: the same rules give the "+"
   pointer-events: none, and an element that is never hit-tested is never
   hovered, so its cursor is never consulted. The browser tests the parent
   instead — which is this box — and used the box's cursor, leaving the pointer
   unchanged over a control that plainly is not usable.

   The "-" and the field stay normal: only the "+" is refused, and saying
   "not-allowed" over the whole stepper would misdescribe the other two. */
.quantity.wcsb-qty-max,
.fkcart-quantity-selector.wcsb-qty-max,
.wfacp_quantity_selector.wcsb-qty-max,
.evov-cart-item__qty.wcsb-qty-max {
	cursor: not-allowed;
}

.quantity.wcsb-qty-max :is(input, .minus, .wd-qty-minus),
.fkcart-quantity-selector.wcsb-qty-max :is(input, .fkcart-quantity-down),
.wfacp_quantity_selector.wcsb-qty-max :is(input, .wfacp_decrease_item),
.evov-cart-item__qty.wcsb-qty-max :is(input, .evov-qty-down) {
	cursor: auto;
}

.quantity.wcsb-qty-max :is(.minus, .wd-qty-minus),
.fkcart-quantity-selector.wcsb-qty-max .fkcart-quantity-down,
.wfacp_quantity_selector.wcsb-qty-max .wfacp_decrease_item,
.evov-cart-item__qty.wcsb-qty-max .evov-qty-down {
	cursor: pointer;
}


/* Checkout step / place-order button while the cart breaches a cap.
   FunnelKit advances its steps in the browser with no server hook to refuse
   one, so this is where a customer meets the problem — instead of the whole
   checkout form being replaced by a "go back to the cart page" screen on a page
   that already contains the cart.

   Deliberately NO pointer-events: none. The click has to land for the script to
   catch it and explain why nothing happened; suppressing the pointer would make
   the button silently inert, which is the exact failure the archive buttons had.
   The script blocks the action in capture phase, so nothing proceeds — the only
   thing this rule does is make it look unavailable. */
:is(.wfacp_next_page_button, #place_order).wcsb-step-blocked,
:is(.wfacp-next-btn-wrap, .wfacp-order-place-btn-wrap) button.wcsb-step-blocked {
	opacity: 0.45;
	cursor: not-allowed;
}
