/* Checkout: − / + / × buttons on each product row (markup: inc/checkout-cart.php).
 * CartFlows makes the product cell a flex row and styles every <button> in the form
 * (green fill, pill border, padding), so the rules below use !important to stay as designed. */

/* Own line under the product name, so the name keeps the full width. */
.woocommerce-checkout-review-order-table td.product-name > .kp-co-item,
.kp-co-item {
	display: flex !important;
	flex: 0 0 100% !important;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-width: 0;
	margin: 8px 0 2px;
}

.kp-co-qty {
	display: inline-flex;
	align-items: center;
	height: 30px;
	border: 1px solid #ddd;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.kp-co-item button,
.kp-co-item button:hover,
.kp-co-item button:focus {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex: 0 0 auto !important;
	width: 30px !important;
	min-width: 0 !important;
	height: 30px !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #333 !important;
	font-size: 17px !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	cursor: pointer;
	transition: background .2s, color .2s;
}

.kp-co-item .kp-co-qty__btn:hover:not(:disabled) {
	background: var(--wd-primary-color, #216837) !important;
	color: #fff !important;
}

.kp-co-item button:disabled {
	opacity: .35;
	cursor: default;
}

.kp-co-qty__val {
	min-width: 28px;
	color: #333;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
}

.kp-co-item .kp-co-remove,
.kp-co-item .kp-co-remove:focus {
	width: 26px !important;
	height: 26px !important;
	border-radius: 50% !important;
	background: #f2f2f2 !important;
	color: #777 !important;
	font-size: 18px !important;
}

.kp-co-item .kp-co-remove:hover {
	background: #e2401c !important;
	color: #fff !important;
}

.kp-co-busy {
	opacity: .5;
	pointer-events: none;
	transition: opacity .2s;
}

/* ---------- Order summary: shipping choices ----------
 * When the order summary lists the shipping choices (radio buttons), they were
 * squeezed into the narrow right-hand column and wrapped word by word. Give the
 * row the full width: heading on top, then one tidy line per choice with the
 * name on the left and the price on the right.
 * CartFlows' own collapsed "Shipping" line (.wcf-shipping-totals-summary) is left alone.
 * Undo: delete this block. */
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) {
	display: block !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) > th,
.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) > td {
	display: block !important;
	width: 100% !important;
	text-align: left !important;
	box-sizing: border-box;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) > th {
	padding-bottom: 6px !important;
	border-bottom: 0 !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) > td {
	padding-top: 0 !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) ul#shipping_method {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) ul#shipping_method li {
	display: flex !important;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px !important;
	padding: 10px 12px !important;
	border: 1px solid rgba(0, 0, 0, .14);
	border-radius: 8px;
	background: rgba(255, 255, 255, .65);
	text-indent: 0 !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) ul#shipping_method li:last-child {
	margin-bottom: 0 !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) ul#shipping_method li input {
	flex: 0 0 auto;
	margin: 0 !important;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) ul#shipping_method li label {
	display: flex !important;
	flex: 1 1 auto;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-width: 0;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left;
}

.woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals:not(.wcf-shipping-totals-summary) ul#shipping_method li label .amount {
	flex: 0 0 auto;
	font-weight: 600;
	white-space: nowrap;
}
