/* TWL Checkout — Receipt Card variant (cosmetic only).
 *
 * Brand: cream #fcfcf4, sage #4b7878, forest #2a3a3a, light #cdd5d5, muted #6a7a7a.
 * Loaded only on WC checkout (see functions.php section 6).
 *
 * Strategy: keep Elementor + WC DOM and all PHP logic intact. Use display:contents
 * + flex order to collapse the 2-column widget into a single 700px centered
 * column with the order summary as a slim top bar, a clean white form card in
 * the middle, payment + Pay button merged into the bottom of the same card.
 */

:root {
	--cream:#fcfcf4;
	--sage:#4b7878;
	--sage-dark:#3a6868;
	--sage-tint:rgba(75,120,120,.07);
	--sage-tint-border:rgba(75,120,120,.18);
	--forest:#2a3a3a;
	--muted:#6a7a7a;
	--line:#cdd5d5;
	--line-soft:#e8ece4;
}

/* ===== Universal: typography, inputs, button ===== */

.woocommerce-checkout {
	font-family: Poppins, system-ui, sans-serif;
	color: var(--forest);
	background: var(--cream);
}

.woocommerce-checkout h2,
.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading {
	font-family: Georgia, serif;
	font-weight: 400;
	color: var(--forest);
	letter-spacing: -0.01em;
}

.woocommerce-checkout .form-row {
	margin: 0 0 14px;
	padding: 0;
}
.woocommerce-checkout .form-row label {
	display: block;
	font-size: 12px;
	font-weight: 500;
	color: var(--forest);
	margin-bottom: 6px;
	line-height: 1.3;
}
.woocommerce-checkout .form-row .required {
	color: #b85c5c;
	text-decoration: none;
}
.woocommerce-checkout .input-text,
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout input[type="number"],
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce-checkout .select2-container .select2-selection {
	width: 100% !important;
	padding: 13px 14px !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	border: 1px solid var(--line) !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--forest) !important;
	font-family: inherit !important;
	box-sizing: border-box !important;
	min-height: 48px !important;
	box-shadow: none !important;
	transition: border-color .12s, box-shadow .12s;
}
.woocommerce-checkout .input-text:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus,
.woocommerce-checkout .select2-container--open .select2-selection {
	outline: none !important;
	border-color: var(--sage) !important;
	box-shadow: 0 0 0 3px rgba(75,120,120,.14) !important;
}

.woocommerce-checkout #place_order,
.woocommerce-checkout button.button.alt {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	background: var(--sage) !important;
	color: var(--cream) !important;
	font-family: inherit !important;
	font-size: 16px !important;
	font-weight: 600 !important;
	padding: 16px 24px !important;
	border: 0 !important;
	border-radius: 32px !important;
	cursor: pointer;
	min-height: 54px !important;
	letter-spacing: .02em;
	transition: background .15s, transform .05s;
	margin: 8px 0 0 !important;
	text-transform: none;
}
.woocommerce-checkout #place_order:hover,
.woocommerce-checkout button.button.alt:hover {
	background: var(--sage-dark) !important;
}
.woocommerce-checkout #place_order:active {
	transform: scale(.98);
}

/* ===== Suppress legacy / stale UI bits ===== */

.woocommerce-checkout .custom-terms,
.woocommerce-checkout .terms_condition_points {
	display: none !important;
}
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-notices-wrapper > .woocommerce-message {
	display: none !important;
}
.woocommerce-checkout .woocommerce-privacy-policy-text {
	display: none !important;
}
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .checkout_coupon,
.woocommerce-checkout .e-coupon-anchor,
.woocommerce-checkout .e-show-coupon-form,
.woocommerce-checkout .e-woocommerce-coupon-nudge,
.woocommerce-checkout .e-coupon-box {
	display: none !important;
}
.woocommerce-checkout #payment .payment_box {
	display: none !important;
}
.woocommerce-checkout .twl-trust-strip,
.woocommerce-checkout .twl-included-card {
	display: none !important;
}

/* ===== Receipt Card layout (desktop ≥ 769px) ===== */

@media (min-width: 769px) {
	.woocommerce-checkout .e-checkout__container,
	.woocommerce-checkout .elementor-widget-woocommerce-checkout-page .e-checkout__container {
		display: flex !important;
		flex-direction: column !important;
		max-width: 700px !important;
		margin: 0 auto !important;
		gap: 0 !important;
		align-items: stretch !important;
	}
	.woocommerce-checkout .e-checkout__column,
	.woocommerce-checkout .e-checkout__column-start,
	.woocommerce-checkout .e-checkout__column-end,
	.woocommerce-checkout .e-checkout__column-inner,
	.woocommerce-checkout .e-sticky-right-column {
		display: contents !important;
		position: static !important;
		max-height: none !important;
		overflow: visible !important;
		width: auto !important;
	}
	.woocommerce-checkout .e-checkout__order_review     { order: 1 !important; }
	.woocommerce-checkout .e-checkout__customer_details { order: 2 !important; }
	.woocommerce-checkout .e-checkout__order_review-2   { order: 3 !important; }
}

/* ===== Top bar: order_review styled as a slim sage-tinted strip ===== */

.woocommerce-checkout .e-checkout__order_review {
	background: var(--sage-tint) !important;
	border: 1px solid var(--sage-tint-border) !important;
	border-radius: 12px !important;
	padding: 12px 20px !important;
	margin: 0 0 18px !important;
}
.woocommerce-checkout .e-checkout__order_review #order_review_heading {
	display: none !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table,
.woocommerce-checkout .e-checkout__order_review .woocommerce-checkout-review-order-table {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	width: 100%;
	display: block !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table thead {
	display: none !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table tbody,
.woocommerce-checkout .e-checkout__order_review .shop_table tfoot {
	display: block !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table tr {
	display: block !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart-subtotal {
	display: none !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item {
	padding: 4px 0 !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item + .cart_item {
	border-top: 1px dashed var(--sage-tint-border) !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item td {
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	font-size: 14px;
	color: var(--forest);
	font-weight: 500;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item td.product-name {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-right: 0 !important;
	padding-inline-end: 0 !important;
	max-width: none !important;
	width: auto !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item td.product-name .twl-item-name {
	flex: 0 1 auto;
	min-width: 0;
	order: 1;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item .product-quantity {
	color: var(--muted);
	font-weight: 400;
	margin-left: 4px;
	flex: 0 0 auto;
	order: 2;
	margin-right: auto;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item .twl-remove-item {
	order: 3;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .cart_item td.product-total {
	display: none !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .order-total {
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-top: 1px solid var(--sage-tint-border) !important;
	padding-top: 8px !important;
	margin-top: 6px !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .order-total th {
	display: inline-block !important;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
	font-weight: 600;
	font-family: Poppins, sans-serif;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .order-total td {
	text-align: right;
	font-family: Georgia, serif;
	font-size: 20px !important;
	color: var(--forest) !important;
	font-weight: 400;
	border: 0 !important;
	background: transparent !important;
	padding: 0 !important;
	flex: 0 0 auto;
}
.woocommerce-checkout .e-checkout__order_review .shop_table .order-total .amount {
	font-family: Georgia, serif;
	font-size: 20px !important;
	font-weight: 400 !important;
	color: var(--forest) !important;
}

/* ===== Remove link (per cart line, on checkout only) ===== */

.woocommerce-checkout .twl-remove-item {
	flex: 0 0 auto;
	background: transparent;
	border: 0;
	padding: 6px 4px;
	margin: 0;
	font-family: Poppins, system-ui, sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: var(--muted);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	transition: color .12s ease;
	min-height: 32px;
	line-height: 1;
}
.woocommerce-checkout .twl-remove-item:hover,
.woocommerce-checkout .twl-remove-item:focus-visible {
	color: var(--forest);
	outline: none;
}
.woocommerce-checkout .twl-remove-item:focus-visible {
	outline: 2px solid var(--sage);
	outline-offset: 2px;
	border-radius: 4px;
}
.woocommerce-checkout .twl-remove-item.is-busy {
	opacity: .55;
	cursor: default;
	pointer-events: none;
}

/* ===== Empty cart state (replaces the default cart-empty notice) ===== */

.woocommerce-checkout .cart-empty.woocommerce-info,
.woocommerce-checkout p.cart-empty,
.woocommerce-checkout p.return-to-shop,
.woocommerce-checkout .return-to-shop {
	display: none !important;
}
.twl-cart-empty {
	background: #fff;
	border: 1px solid var(--line-soft);
	border-radius: 14px;
	padding: 40px 28px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
	margin: 24px auto;
	max-width: 560px;
	font-family: Poppins, system-ui, sans-serif;
	color: var(--forest);
}
.twl-cart-empty h2 {
	font-family: Georgia, serif;
	font-size: 26px;
	color: var(--forest);
	margin: 0 0 8px;
	font-weight: 400;
	letter-spacing: -0.01em;
}
.twl-cart-empty p {
	color: var(--muted);
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.55;
}
.twl-cart-empty .twl-empty-ctas {
	display: flex;
	gap: 10px;
	justify-content: center;
	flex-wrap: wrap;
}
.twl-cart-empty .twl-empty-cta {
	display: inline-block;
	padding: 12px 22px;
	border-radius: 32px;
	background: var(--sage);
	color: var(--cream);
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: .02em;
	transition: background .15s ease, color .15s ease;
	border: 1px solid var(--sage);
}
.twl-cart-empty .twl-empty-cta:hover,
.twl-cart-empty .twl-empty-cta:focus {
	background: var(--sage-dark);
	border-color: var(--sage-dark);
	color: var(--cream);
}
.twl-cart-empty .twl-empty-cta--secondary {
	background: transparent;
	color: var(--sage);
	border: 1px solid var(--line);
}
.twl-cart-empty .twl-empty-cta--secondary:hover,
.twl-cart-empty .twl-empty-cta--secondary:focus {
	background: var(--sage-tint);
	color: var(--forest);
	border-color: var(--sage);
}
@media (max-width: 480px) {
	.twl-cart-empty {
		padding: 32px 18px;
	}
	.twl-cart-empty .twl-empty-ctas {
		flex-direction: column;
	}
	.twl-cart-empty .twl-empty-cta {
		width: 100%;
	}
}

/* ===== Form card: customer_details ===== */

.woocommerce-checkout .e-checkout__customer_details,
.woocommerce-checkout #customer_details {
	background: #fff !important;
	border-radius: 14px 14px 0 0 !important;
	padding: 28px 30px 16px !important;
	margin: 0 !important;
	box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
	border: 1px solid var(--line-soft) !important;
	border-bottom: 0 !important;
}
.woocommerce-checkout .e-checkout__customer_details h3,
.woocommerce-checkout #customer_details h3 {
	display: none !important;
}
.woocommerce-checkout .woocommerce-billing-fields::before {
	content: "Your details";
	display: block;
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sage);
	font-weight: 600;
	font-family: Poppins, sans-serif;
	margin: 0 0 14px;
}
.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper > .form-row {
	grid-column: span 2;
}
.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper > #billing_first_name_field,
.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper > #billing_last_name_field {
	grid-column: span 1;
}

/* ===== Payment + Pay button: order_review-2 styled as bottom of the same card ===== */

.woocommerce-checkout .e-checkout__order_review-2 {
	background: #fff !important;
	border-radius: 0 0 14px 14px !important;
	padding: 4px 30px 28px !important;
	margin: 0 0 24px !important;
	box-shadow: 0 1px 3px rgba(0,0,0,.04) !important;
	border: 1px solid var(--line-soft) !important;
	border-top: 0 !important;
}
.woocommerce-checkout .e-checkout__order_review-2::before {
	content: "";
	display: block;
	height: 1px;
	background: var(--line-soft);
	margin: 0 0 18px;
}
.woocommerce-checkout #payment::before {
	content: "Payment method";
	display: block;
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--sage);
	font-weight: 600;
	margin: 0 0 12px;
}
.woocommerce-checkout #payment {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 0 18px !important;
}
.woocommerce-checkout #payment ul.payment_methods {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none;
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 10px;
}
.woocommerce-checkout #payment ul.payment_methods > li {
	background: #fff !important;
	border: 1.5px solid var(--line) !important;
	border-radius: 10px !important;
	padding: 0 !important;
	margin: 0 !important;
	transition: border-color .12s, background .12s;
	min-height: 56px;
	display: flex;
	align-items: center;
}
.woocommerce-checkout #payment ul.payment_methods > li:hover {
	border-color: var(--sage) !important;
}
.woocommerce-checkout #payment ul.payment_methods > li:has(input:checked) {
	border-color: var(--sage) !important;
	background: rgba(75,120,120,.04) !important;
}
.woocommerce-checkout #payment ul.payment_methods label {
	display: flex !important;
	align-items: center;
	gap: 10px;
	padding: 12px 14px !important;
	width: 100%;
	margin: 0 !important;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: var(--forest) !important;
	min-height: 56px;
}
.woocommerce-checkout #payment ul.payment_methods input[type="radio"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--sage);
	flex-shrink: 0;
}
.woocommerce-checkout #payment ul.payment_methods label img {
	max-height: 20px;
	max-width: 60px;
	width: auto;
	height: auto;
	margin-left: auto;
	object-fit: contain;
}

/* Refund notice — single tight line above Pay button */
.woocommerce-checkout .twl-refund-notice {
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0 0 12px;
	font-family: inherit;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.55;
	text-align: center;
}
.woocommerce-checkout .twl-refund-notice p { margin: 0; }
.woocommerce-checkout .twl-refund-notice strong { display: none; }
.woocommerce-checkout .twl-refund-notice a {
	color: var(--sage);
	text-decoration: underline;
	font-weight: 500;
}
.woocommerce-checkout .twl-refund-notice a:hover {
	color: var(--sage-dark);
}

/* Terms checkbox (if WC enables it later) */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	background: transparent !important;
	border: 0 !important;
	padding: 0 !important;
	margin: 0 0 12px !important;
	font-size: 12px;
	color: var(--muted);
}

/* Reassurance line under the Pay button (2026-05-20).
 * Pairs with the "Confirm & Pay" copy in functions.php section 7. */
.woocommerce-checkout .twl-next-step-reassurance {
	margin: 12px 0 0;
	text-align: center;
	font-size: 12px;
	color: var(--muted);
	line-height: 1.5;
	font-style: normal;
}

/* ===== Mobile (under 769px) — same single-column, tighter ===== */

@media (max-width: 768px) {
	.woocommerce-checkout .e-checkout__container {
		display: flex;
		flex-direction: column;
		max-width: 100%;
		padding: 0 14px;
	}
	.woocommerce-checkout .e-checkout__order_review {
		padding: 10px 14px !important;
		margin-bottom: 12px !important;
	}
	.woocommerce-checkout .e-checkout__customer_details,
	.woocommerce-checkout #customer_details {
		padding: 22px 18px 12px !important;
	}
	.woocommerce-checkout .e-checkout__order_review-2 {
		padding: 4px 18px 22px !important;
	}
	.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper {
		grid-template-columns: 1fr;
	}
	.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper > #billing_first_name_field,
	.woocommerce-checkout .e-checkout__customer_details .woocommerce-billing-fields__field-wrapper > #billing_last_name_field {
		grid-column: span 1;
	}
	.woocommerce-checkout #payment ul.payment_methods {
		grid-template-columns: 1fr;
	}
}
