/* ==========================================================================
   Checkout — Order received (thank you) page
   Every rule is scoped to .section-checkout-success or .woocommerce-thankyou-hook
   so nothing leaks to order-pay, my-account/view-order or email templates that
   reuse the same WooCommerce markup (.table-woocommerce-bacs-bank-details,
   .woocommerce-order-details, .woocommerce-customer-details).
   Tokens reused from theme: --primary-1/3/4/5, --gray-600, --gray-950,
   --color-gray-e5, --color-tertiary.
   Root font-size is fluid (1vw >=1200px, 16px below).
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Section shells — one continuous tinted surface, white cards on top
   -------------------------------------------------------------------------- */
.section-checkout-success {
	background-color: var(--primary-4);
}

.section-checkout-success .section-wrap-box-white {
	max-width: 1080px;
	margin-inline: auto;
	height: auto;
}

.section-checkout-success .vhc-thankyou-email {
	max-width: 100%;
}
.section-checkout-success .vhc-thankyou-email .woocommerce-column.woocommerce-column--billing-address {
	display: none;
}

/* --------------------------------------------------------------------------
   2. Success header — badge + centred confirmation block
   -------------------------------------------------------------------------- */
.section-checkout-success .vhc-thankyou-email__intro {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--color-gray-e5);
	text-align: center;
}

.section-checkout-success .vhc-thankyou-email__intro::before {
	content: "";
	display: block;
	width: 3.33333rem;
	height: 3.33333rem;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background-color: var(--primary-1);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 50%;
}

.section-checkout-success .vhc-thankyou-email__brand {
	margin-bottom: 0.5rem;
	font-size: 1.5rem;
	line-height: 1.3;
}

.section-checkout-success .vhc-thankyou-email__intro p {
	max-width: 40rem;
	margin-inline: auto;
	color: var(--gray-600);
}

.section-checkout-success .vhc-thankyou-email__intro p:last-child {
	margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   3. Bank transfer panel — the primary call to action, must not read as prose.
   Rendered in both blocks, so both parents are listed.
   -------------------------------------------------------------------------- */
.section-checkout-success .table-woocommerce-bacs-bank-details,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details {
	border: 0;
	border-collapse: collapse;
}

.section-checkout-success .table-woocommerce-bacs-bank-details tr.table-woocommerce-bacs-bank-details-header,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details tr.table-woocommerce-bacs-bank-details-header {
	display: none;
}

.section-checkout-success .table-woocommerce-bacs-bank-details td.table-woocommerce-bacs-bank-details-item,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details td.table-woocommerce-bacs-bank-details-item {
	padding: 0;
	border: 0;
}

.section-checkout-success .table-woocommerce-bacs-bank-details .wrap-info,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .wrap-info {
	padding: 1.25rem 1.5rem;
	border: 1px solid rgba(0, 142, 131, 0.25);
	border-left: 4px solid var(--primary-1);
	border-radius: 0.625rem;
	background-color: var(--primary-4);
	line-height: 2;
	word-break: break-word;
}

.section-checkout-success .table-woocommerce-bacs-bank-details .wrap-info strong,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .wrap-info strong {
	color: var(--primary-5);
	font-weight: 600;
}

.section-checkout-success .table-woocommerce-bacs-bank-details .title-banking,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .title-banking {
	display: block;
	margin-bottom: 0.5rem;
	color: var(--primary-1);
	font-size: 1.125rem;
	line-height: 1.4;
}

/* the template hard-codes `<br><br>` after the panel title */
.section-checkout-success .table-woocommerce-bacs-bank-details .title-banking + br,
.section-checkout-success .table-woocommerce-bacs-bank-details .title-banking + br + br,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .title-banking + br,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .title-banking + br + br {
	display: none;
}

/* payment reference is what customers get wrong most often */
.section-checkout-success .table-woocommerce-bacs-bank-details .wrap-info strong:last-of-type,
.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .wrap-info strong:last-of-type {
	color: var(--primary-3);
}

/* --------------------------------------------------------------------------
   4. Order summary table
   -------------------------------------------------------------------------- */
.section-checkout-success .vhc-thankyou-email__order .woocommerce-order-details__title,
.section-checkout-success .vhc-thankyou-email__addresses .woocommerce-column__title {
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--color-gray-e5);
}

.section-checkout-success .vhc-thankyou-email__order-number {
	color: var(--gray-600);
	font-weight: 500;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details {
	width: 100%;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tbody td {
	padding: 0.9375rem 0;
	border-bottom: 1px solid var(--color-gray-e5);
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table__product-name a {
	color: var(--gray-950);
	font-weight: 500;
	transition: color 0.25s ease;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table__product-name a:hover {
	color: var(--primary-1);
}

.section-checkout-success .vhc-thankyou-email__order .product-quantity {
	color: var(--primary-1);
	white-space: nowrap;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table__product-total {
	font-weight: 600;
}

/* gift / item meta reads as an attached note, not as body copy */
.section-checkout-success .vhc-thankyou-email__order .wc-item-meta {
	display: inline-block;
	margin: 0.625rem 0 0;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background-color: var(--color-tertiary);
}

.section-checkout-success .vhc-thankyou-email__order .wc-item-meta li p {
	display: inline;
	margin: 0;
}

.section-checkout-success .vhc-thankyou-email__order .wc-item-meta-label img.emoji {
	width: 1em;
	height: 1em;
	vertical-align: -0.15em;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot th,
.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot td {
	padding: 0.625rem 0;
	border: 0;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot th {
	color: var(--gray-600);
	font-weight: 500;
	text-align: left;
}

.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot td {
	font-weight: 600;
}

/* grand total = last footer row that carries a price */
.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) th,
.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) td {
	padding-top: 0.9375rem;
	border-top: 1px solid var(--color-gray-e5);
	color: var(--primary-1);
	font-weight: 700;
	font-size: 1.125rem;
}

/* --------------------------------------------------------------------------
   5. Addresses + footer + CTA
   -------------------------------------------------------------------------- */
.section-checkout-success .vhc-thankyou-email__addresses {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
	gap: 1.25rem;
}

/* keep every address card the same height when billing + shipping both render */
.section-checkout-success .vhc-thankyou-email__addresses .woocommerce-column {
	display: flex;
	flex-direction: column;
}

.section-checkout-success .vhc-thankyou-email__addresses address {
	flex: 1 1 auto;
	border-radius: 0.625rem;
}

.section-checkout-success .vhc-thankyou-email__addresses .woocommerce-customer-details--phone,
.section-checkout-success .vhc-thankyou-email__addresses .woocommerce-customer-details--email {
	color: var(--gray-600);
}

.section-checkout-success .vhc-thankyou-email__footer {
	padding-top: 1.25rem;
	border-top: 1px solid var(--color-gray-e5);
	color: var(--gray-600);
}

.section-checkout-success .vhc-thankyou-email__footer a {
	color: var(--primary-1);
	text-decoration: underline;
}

.section-checkout-success .button-more .btn {
	min-width: 16rem;
}

/* --------------------------------------------------------------------------
   6. Default WooCommerce thankyou hook output
   Full-bleed and unstyled by default — give it the same shell as the section.
   NOTE: this block duplicates the summary above. To hide it instead, use:
   .woocommerce-thankyou-hook { display: none; }
   -------------------------------------------------------------------------- */
.woocommerce-thankyou-hook {
	padding: 0 20px 4.16667rem;
	background-color: var(--primary-4);
}

.woocommerce-thankyou-hook > section {
	max-width: 1080px;
	margin: 0 auto 1.25rem;
	padding: 1.66667rem;
	border: 1px solid hsla(0, 0%, 86%, 0.6);
	border-radius: 1.25rem;
	background-color: #fff;
	box-shadow: 0 4px 4px 0 rgba(31, 34, 39, 0.08);
}

.woocommerce-thankyou-hook > section:last-child {
	margin-bottom: 0;
}

.woocommerce-thankyou-hook .woocommerce-order-details__title,
.woocommerce-thankyou-hook .woocommerce-column__title {
	margin: 0 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--color-gray-e5);
	color: var(--primary-1);
	font-weight: 700;
	font-size: 1.25rem;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details thead th {
	padding: 0 0 0.625rem;
	border-bottom: 2px solid var(--primary-1);
	color: var(--gray-600);
	font-weight: 600;
	text-align: left;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details tbody td {
	padding: 0.9375rem 0;
	border-bottom: 1px solid var(--color-gray-e5);
	vertical-align: top;
}

.woocommerce-thankyou-hook .woocommerce-table__product-name a {
	color: var(--gray-950);
	font-weight: 500;
	transition: color 0.25s ease;
}

.woocommerce-thankyou-hook .woocommerce-table__product-name a:hover {
	color: var(--primary-1);
}

.woocommerce-thankyou-hook .product-quantity {
	color: var(--primary-1);
	white-space: nowrap;
}

.woocommerce-thankyou-hook .wc-item-meta {
	display: inline-block;
	margin: 0.625rem 0 0;
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	background-color: var(--color-tertiary);
	list-style: none;
}

.woocommerce-thankyou-hook .wc-item-meta li p {
	display: inline;
	margin: 0;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot th,
.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot td {
	padding: 0.625rem 0;
	border: 0;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot th {
	color: var(--gray-600);
	font-weight: 500;
	text-align: left;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details .product-total,
.woocommerce-thankyou-hook .woocommerce-table--order-details thead .product-total,
.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot td {
	width: 30%;
	text-align: right;
	white-space: nowrap;
	font-weight: 600;
}

.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) th,
.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) td {
	padding-top: 0.9375rem;
	border-top: 1px solid var(--color-gray-e5);
	color: var(--primary-1);
	font-weight: 700;
	font-size: 1.125rem;
}

/* cancel / order action button — theme's `.woocommerce a.button` is (0,2,1),
   so this needs the extra class to win */
.woocommerce-thankyou-hook .order-actions--heading {
	vertical-align: middle;
}

.woocommerce-thankyou-hook a.woocommerce-button.order-actions-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 1.25rem;
	border: 1px solid var(--primary-3);
	border-radius: 9999px;
	background-color: transparent;
	color: var(--primary-3);
	font-weight: 600;
	line-height: 1.2;
	transition: all 0.25s ease;
}

.woocommerce-thankyou-hook a.woocommerce-button.order-actions-button:hover {
	background-color: var(--primary-3);
	color: #fff;
}

.woocommerce-thankyou-hook .woocommerce-customer-details address {
	display: block;
	padding: 1rem;
	border: 1px solid var(--color-gray-e5);
	border-radius: 0.625rem;
	background: var(--color-tertiary);
	font-style: normal;
	line-height: 1.6;
}

.woocommerce-thankyou-hook .woocommerce-customer-details address p {
	margin: 0.35rem 0 0;
	color: var(--gray-600);
}

/* --------------------------------------------------------------------------
   7. Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
	.section-checkout-success .section-wrap-box-white,
	.woocommerce-thankyou-hook > section {
		padding: 1.25rem;
		border-radius: 0.75rem;
	}

	.section-checkout-success .table-woocommerce-bacs-bank-details .wrap-info,
	.woocommerce-thankyou-hook .table-woocommerce-bacs-bank-details .wrap-info {
		padding: 1rem;
		line-height: 1.8;
	}
}

@media (max-width: 575.98px) {
	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tbody td.woocommerce-table__product-name,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tbody td.woocommerce-table__product-name {
		padding-bottom: 0.375rem;
		border-bottom: 0;
	}

	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tbody td.woocommerce-table__product-total,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tbody td.woocommerce-table__product-total {
		padding-top: 0;
		color: var(--primary-1);
	}

	.woocommerce-thankyou-hook .woocommerce-table--order-details thead {
		display: none;
	}

	.woocommerce-thankyou-hook .woocommerce-table--order-details tbody td,
	.woocommerce-thankyou-hook .woocommerce-table--order-details .product-total {
		display: block;
		width: 100%;
		text-align: left;
	}

	/* label keeps its natural width; a value that no longer fits wraps to its
	   own full-width line instead of squeezing the label to one word per line */
	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot tr,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot tr {
		display: flex;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0.25rem 0.5rem;
	}

	/* width:auto is required — the template's own inline <style> forces
	   width:100% on tfoot th/td here, which pushes every value onto its own row */
	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot th,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot th {
		flex: 0 0 auto;
		width: auto;
		max-width: 100%;
	}

	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot td,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot td {
		flex: 1 1 auto;
		width: auto;
		text-align: left;
	}

	/* the grand-total rule underlines th and td separately; once the row is a
	   flex container that reads as two broken segments, so move it to the row */
	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)),
	.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) {
		padding-top: 0.9375rem;
		border-top: 1px solid var(--color-gray-e5);
	}

	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) th,
	.section-checkout-success .vhc-thankyou-email__order .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) td,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) th,
	.woocommerce-thankyou-hook .woocommerce-table--order-details tfoot tr:has(.woocommerce-Price-amount):not(:has(~ tr .woocommerce-Price-amount)) td {
		padding-top: 0;
		border-top: 0;
	}
}

.woocommerce-order-received .woocommerce-thankyou-hook {
	display: none;
}