/*
 * Paramount Checkout UI – cart page fixes (v1.2, October 2026 audits).
 * Loaded on the cart only, after the theme's stylesheets.
 */

/* ------------------------------------------------------------------
 * Show the shipping row, so Subtotal + Shipping + Tax = Total (UX C01 ·
 * UI 9). Uncode › Theme Options › Custom CSS has
 * `.woocommerce-cart tr.woocommerce-shipping-totals.shipping
 * { display:none !important }`; this more specific rule wins over it.
 * ------------------------------------------------------------------ */
body.woocommerce-cart .cart_totals table tr.woocommerce-shipping-totals.shipping {
	display: table-row !important;
}

/* ------------------------------------------------------------------
 * Coupon on the left, Update cart on the right of the same row; on narrow
 * screens Update cart drops below instead of overlapping (UI 8, 25). The
 * actions cell stays a normal table cell (making it flex broke the table's
 * column widths and left an empty column next to the products).
 * ------------------------------------------------------------------ */
.woocommerce-cart table.cart td.actions .coupon {
	float: left;
	gap: 8px;
}
.woocommerce-cart table.cart td.actions .coupon .button {
	white-space: nowrap;
}
.woocommerce-cart table.cart td.actions div.coupon + button {
	position: static;
	float: right;
	margin: 4px 0 0 12px;
}
@media (max-width: 569px) {
	/* Coupon field and Apply button stacked, full width, same edges and
	   height (side by side the field was squeezed to ~100px next to the
	   wide uppercase button). */
	.woocommerce-cart table.cart td.actions .coupon {
		float: none;
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		width: 100%;
	}
	.woocommerce-cart table.cart td.actions .coupon .input-text {
		width: 100% !important;
		height: 48px;
		margin: 0 !important;
		font-size: 16px !important; /* stops iOS zooming into the field */
	}
	.woocommerce-cart table.cart td.actions .coupon .button {
		width: 100% !important;
		height: 48px;
		margin: 0 !important;
	}
	.woocommerce-cart table.cart td.actions div.coupon + button {
		float: none;
		width: 100%;
		margin: 12px 0 0;
	}
}
@media (max-width: 959px) {
	.woocommerce-cart input.input-text {
		font-size: 16px;
	}
}

/* Shipping choices, readable now that the row is shown. */
.woocommerce-cart .cart_totals #shipping_method {
	margin: 0;
	padding: 0;
}
.woocommerce-cart .cart_totals #shipping_method li {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin: 0 0 6px;
	list-style: none;
	text-align: right;
}
.woocommerce-cart .cart_totals #shipping_method li input {
	order: -1;
	margin: 0;
	flex: 0 0 auto;
}
.woocommerce-cart .cart_totals #shipping_method li label {
	display: inline;
	margin: 0;
}
.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
	font-size: 13px;
	margin-top: 4px;
}
