body.woocommerce-cart .woocommerce {
	--tbae-basket-blue: var(--e-global-color-primary, #1368de);
	--tbae-basket-navy: var(--e-global-color-text, #2f4b73);
	--tbae-basket-orange: var(--e-global-color-accent, #f39200);
	--tbae-basket-pale: #f3f7fd;
	--tbae-basket-border: #dbe5f2;
	color: var(--tbae-basket-navy);
	font-family: tt-commons-pro, sans-serif;
}

body.woocommerce-cart .woocommerce:has(.woocommerce-cart-form) {
	display: grid;
	grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr);
	gap: clamp(24px, 3vw, 40px);
	align-items: start;
}

body.woocommerce-cart .woocommerce > .woocommerce-notices-wrapper,
body.woocommerce-cart .woocommerce > .woocommerce-error,
body.woocommerce-cart .woocommerce > .woocommerce-message,
body.woocommerce-cart .woocommerce > .woocommerce-info {
	grid-column: 1 / -1;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

body.woocommerce-cart .woocommerce-message,
body.woocommerce-cart .woocommerce-info,
body.woocommerce-cart .woocommerce-error {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 0 24px;
	padding: 18px 22px 18px 52px !important;
	border: 1px solid var(--tbae-basket-border);
	border-radius: 10px;
	background: #fff;
	color: var(--tbae-basket-navy);
	font-size: 18px;
	line-height: 1.45;
}

body.woocommerce-cart .woocommerce-message::before,
body.woocommerce-cart .woocommerce-info::before,
body.woocommerce-cart .woocommerce-error::before {
	top: 50%;
	left: 20px;
	transform: translateY(-50%);
}

body.woocommerce-cart .cart-empty.woocommerce-info {
	margin-bottom: 18px;
	padding: 22px 24px !important;
	border: 1px solid var(--tbae-basket-border);
	border-radius: 14px;
	background: #fff;
	color: var(--tbae-basket-navy);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
}

body.woocommerce-cart .cart-empty.woocommerce-info::before {
	display: none;
	content: none;
}

body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .cart_totals {
	float: none !important;
	width: 100% !important;
}

body.woocommerce-cart table.shop_table {
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0 16px;
	background: transparent;
}

body.woocommerce-cart table.shop_table thead {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

body.woocommerce-cart table.shop_table tbody {
	display: block;
}

body.woocommerce-cart table.shop_table tr.cart_item {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto 48px;
	grid-template-areas: "thumb product subtotal remove";
	gap: 20px;
	align-items: center;
	margin-bottom: 16px;
	padding: 22px;
	overflow: hidden;
	border: 1px solid var(--tbae-basket-border);
	border-radius: 18px;
	background: var(--tbae-basket-pale);
	box-shadow: 0 12px 30px rgb(47 75 115 / 7%);
}

body.woocommerce-cart table.shop_table tr.cart_item > td {
	display: block;
	padding: 0;
	border: 0;
	background: transparent;
}

body.woocommerce-cart td.product-thumbnail {
	grid-area: thumb;
}

body.woocommerce-cart td.product-thumbnail img {
	width: 96px;
	height: 76px;
	border-radius: 12px;
	object-fit: cover;
}

body.woocommerce-cart td.product-name {
	grid-area: product;
	min-width: 0;
	font-size: 17px;
	line-height: 1.35;
}

body.woocommerce-cart td.product-name > a {
	display: inline-block;
	margin-bottom: 10px;
	color: var(--tbae-basket-blue);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.15;
	text-decoration: none;
}

body.woocommerce-cart td.product-name > a:hover,
body.woocommerce-cart td.product-name > a:focus-visible {
	color: var(--tbae-basket-orange);
}

body.woocommerce-cart dl.variation {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 4px 8px;
	margin: 0;
	color: var(--tbae-basket-navy);
	font-size: 15px;
}

body.woocommerce-cart dl.variation dt,
body.woocommerce-cart dl.variation dd,
body.woocommerce-cart dl.variation p {
	float: none;
	margin: 0;
	padding: 0;
}

body.woocommerce-cart dl.variation dt {
	font-weight: 700;
}

body.woocommerce-cart td.product-price {
	display: none !important;
}

body.woocommerce-cart td.product-subtotal {
	grid-area: subtotal;
	color: var(--tbae-basket-navy);
	font-size: 20px;
	font-weight: 700;
	white-space: nowrap;
}

/* Event participants are deliberately sold individually. */
body.woocommerce-cart td.product-quantity {
	display: none !important;
}

body.woocommerce-cart td.product-remove {
	grid-area: remove;
}

body.woocommerce-cart td.product-remove a.remove {
	display: grid;
	width: 44px;
	height: 44px;
	border: 1px solid #f1b5b5;
	border-radius: 10px;
	background: #fff;
	color: #be2d2d !important;
	font-size: 27px;
	line-height: 1;
	place-items: center;
}

body.woocommerce-cart td.product-remove a.remove:hover,
body.woocommerce-cart td.product-remove a.remove:focus-visible {
	border-color: #be2d2d;
	background: #fff0f0;
}

body.woocommerce-cart .woocommerce-cart-form table.shop_table tr:not(.cart_item),
body.woocommerce-cart .woocommerce-cart-form table.shop_table tr:not(.cart_item):hover {
	display: block;
	background: transparent !important;
	box-shadow: none !important;
}

body.woocommerce-cart table.shop_table td.actions,
body.woocommerce-cart table.shop_table td.actions:hover {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0 0;
	border: 0;
	background: transparent !important;
}

body.woocommerce-cart .actions .coupon {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

body.woocommerce-cart .actions .coupon #coupon_code {
	width: clamp(220px, 22vw, 320px) !important;
	min-height: 48px;
	padding: 12px 16px;
	border: 1px solid var(--tbae-basket-border);
	border-radius: 8px;
	background: #fff;
	font-size: 16px;
}

body.woocommerce-cart .woocommerce button.button,
body.woocommerce-cart .woocommerce a.button {
	min-height: 48px;
	padding: 12px 20px;
	border: 1px solid var(--tbae-basket-blue);
	border-radius: 8px;
	background: #fff;
	color: var(--tbae-basket-blue);
	font-weight: 700;
}

body.woocommerce-cart .woocommerce button.button:hover,
body.woocommerce-cart .woocommerce button.button:focus-visible,
body.woocommerce-cart .woocommerce a.button:hover,
body.woocommerce-cart .woocommerce a.button:focus-visible {
	background: var(--tbae-basket-blue);
	color: #fff;
}

body.woocommerce-cart .cart_totals {
	position: sticky;
	top: 32px;
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--tbae-basket-border);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 16px 40px rgb(47 75 115 / 10%);
}

body.woocommerce-cart .cart_totals h2 {
	margin: 0 0 22px;
	color: var(--tbae-basket-blue);
	font-size: clamp(30px, 3vw, 42px);
	font-weight: 900;
	line-height: 1;
}

body.woocommerce-cart .cart_totals table.shop_table {
	display: table;
	width: 100%;
	margin-bottom: 24px;
	border-spacing: 0;
}

body.woocommerce-cart .cart_totals table.shop_table tbody {
	display: table-row-group;
}

body.woocommerce-cart .cart_totals table.shop_table tr {
	display: table-row;
}

body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
	padding: 14px 0;
	border: 0;
	border-bottom: 1px solid var(--tbae-basket-border);
	background: transparent;
	color: var(--tbae-basket-navy);
	font-size: 17px;
}

body.woocommerce-cart .cart_totals table.shop_table td {
	text-align: right;
}

body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td {
	border-bottom: 0;
	font-size: 21px;
	font-weight: 800;
}

body.woocommerce-cart .cart_totals .order-total td .includes_tax {
	display: block;
	margin-top: 4px;
	font-size: 0.72em;
	font-weight: 400;
	line-height: 1.3;
	white-space: normal;
}

body.woocommerce-cart .wc-proceed-to-checkout {
	padding: 0;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: flex;
	width: 100%;
	min-height: 56px;
	align-items: center;
	justify-content: center;
	margin: 0;
	border: 0;
	border-radius: 8px;
	background: var(--tbae-basket-orange);
	color: #fff;
	font-size: 18px;
	font-weight: 800;
}

body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus-visible {
	background: #d98000;
	color: #fff;
}

body.woocommerce-cart .cart-empty {
	margin: 0 0 24px;
	color: var(--tbae-basket-navy);
	font-size: clamp(24px, 3vw, 36px);
	font-weight: 800;
	text-align: center;
}

body.woocommerce-cart .return-to-shop {
	text-align: center;
}

@media (max-width: 900px) {
	body.woocommerce-cart .woocommerce:has(.woocommerce-cart-form) {
		grid-template-columns: 1fr;
	}

	body.woocommerce-cart .cart_totals {
		position: static;
	}
}

@media (max-width: 767px) {
	body.woocommerce-cart table.shop_table tr.cart_item {
		grid-template-columns: minmax(0, 1fr) 44px;
		grid-template-areas:
			"product remove"
			"subtotal subtotal";
		gap: 12px 16px;
		padding: 16px;
	}

	body.woocommerce-cart td.product-thumbnail {
		display: none !important;
	}

	body.woocommerce-cart td.product-name {
		width: auto !important;
		text-align: left !important;
	}

	body.woocommerce-cart td.product-name::before {
		display: none !important;
		content: none !important;
	}

	body.woocommerce-cart td.product-name > a {
		display: block;
		text-align: left;
	}

	body.woocommerce-cart dl.variation,
	body.woocommerce-cart dl.variation dt,
	body.woocommerce-cart dl.variation dd,
	body.woocommerce-cart dl.variation p {
		text-align: left !important;
	}

	body.woocommerce-cart td.product-price {
		display: none;
	}

	body.woocommerce-cart td.product-subtotal {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		width: 100% !important;
		padding-top: 12px;
		border-top: 1px solid var(--tbae-basket-border);
		font-size: 18px;
		text-align: left !important;
	}

	body.woocommerce-cart td.product-subtotal::before {
		float: none !important;
	}

	body.woocommerce-cart table.shop_table td.actions {
		align-items: stretch;
		flex-direction: column;
	}

	body.woocommerce-cart table.shop_table td.actions .coupon {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) max-content;
		gap: 8px;
		align-items: stretch;
		width: 100%;
		min-width: 0;
	}

	body.woocommerce-cart table.shop_table td.actions .coupon label {
		display: none !important;
	}

	body.woocommerce-cart table.shop_table td.actions .coupon #coupon_code {
		float: none !important;
		grid-column: 1;
		grid-row: 1;
		box-sizing: border-box;
		width: 100% !important;
		max-width: 100%;
		min-width: 0;
		margin: 0;
	}

	body.woocommerce-cart table.shop_table td.actions .coupon button {
		float: none !important;
		grid-column: 2;
		grid-row: 1;
		width: auto !important;
		min-width: max-content;
		margin: 0 !important;
		white-space: nowrap;
	}
}

/* PayPal buttons
 *
 * The button itself renders inside a PayPal iframe, so its own corners can't
 * be restyled from here. Clipping the container with overflow gives us the
 * site's 8px radius, and the margin separates it from "Proceed to checkout"
 * rather than the two sitting flush against each other.
 */
body.woocommerce-cart .wc-proceed-to-checkout .ppc-button-wrapper {
	width: 100%;
	margin: 12px 0 0;
}

/* The outline button style already draws its own border inside PayPal's
 * iframe, so adding one here produced two concentric edges. Leave the border
 * and the corner radius to PayPal and only control the width.
 *
 * The fr-based grid gives this column a fractional width (325.391px), which
 * left the button's right border straddling two pixel columns and rendering
 * paler than the left. Flooring to a whole pixel lands both edges cleanly.
 * Browsers without round() keep the plain 100% and the old behaviour.
 */
body.woocommerce-cart [id^="ppc-button-ppcp-"] {
	width: 100%;
	width: round(down, 100%, 1px);
}

/* PayPal stacks its alternative buttons (Pay Later, Apple Pay) as siblings. */
body.woocommerce-cart [id^="ppc-button-ppcp-"] + [id^="ppc-button-ppcp-"] {
	margin-top: 10px;
}

body.woocommerce-cart .wc-proceed-to-checkout .ppcp-messages {
	margin-top: 12px;
}
