/* ==========================================================================
   NULLIFIER — THE PACKING ROOM
   The bag and the checkout. Loaded on those two pages only (inc/packing.php),
   and every rule is scoped to body.nf-packing. The room's picture, focus and
   darkness arrive as --nf-room-* custom properties from the settings.
   ========================================================================== */

body.nf-packing {
	--nf-stone: #d6d5cf;
	--nf-paper: #efeee8;
	--nf-ink: #121216;
	--nf-ink-2: #5a5a60;
	--nf-rule-dark: rgba(18, 18, 22, 0.16);
	background: #07070a;
}

/* --- The room ----------------------------------------------------------- */

body.nf-packing .wp-site-blocks > main.nf-room {
	position: relative;
	isolation: isolate;
	box-sizing: border-box;
	min-height: 72vh;
	margin: 0 !important;
	padding: clamp(2rem, 4.5vw, 3.75rem) var(--nf-gutter, 1.5rem) clamp(3.5rem, 7vw, 6rem) !important;
}

/*
 * The picture is sized to the screen, not to the page (1.7.9).
 *
 * It used to be "cover" over the whole room, so its size followed the room's
 * height, and that height changes several times while WooCommerce draws the
 * bag or checkout: the picture visibly zoomed in and out as the page loaded.
 * Now it covers one screen (its shape comes from packing.php as --nf-room-r,
 * its focus as --nf-room-fx / --nf-room-fy) and the darkening is measured in
 * screen heights too, so nothing about the room moves as the content arrives.
 * Below the first screen the room is simply dark, as before.
 */
body.nf-packing {
	--nf-vh: 100vh;
	--nf-bg-w: max(100vw, calc(var(--nf-vh) * var(--nf-room-r, 1.7769)));
	--nf-bg-h: calc(var(--nf-bg-w) / var(--nf-room-r, 1.7769));
	--nf-bg-pos: calc(var(--nf-room-fx, 0.7) * 100%) calc((var(--nf-vh) - var(--nf-bg-h)) * var(--nf-room-fy, 0.4));
}

@supports (height: 100lvh) {
	body.nf-packing {
		--nf-vh: 100lvh;
	}
}

body.nf-packing main.nf-room::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(180deg, rgba(7, 7, 10, var(--nf-room-dim, 0.62)) 0, rgba(7, 7, 10, calc(var(--nf-room-dim, 0.62) + 0.14)) calc(var(--nf-vh) * 0.45), rgba(7, 7, 10, 0.96) var(--nf-vh)),
		var(--nf-room-bg, none) var(--nf-bg-pos) / var(--nf-bg-w) var(--nf-bg-h) no-repeat #07070a;
}

body.nf-packing--checkout main.nf-room::before,
body.nf-packing--confirm main.nf-room::before {
	background:
		linear-gradient(90deg, rgba(7, 7, 10, 0.55), rgba(7, 7, 10, 0) 60%),
		linear-gradient(180deg, rgba(7, 7, 10, calc(var(--nf-room-dim, 0.62) + 0.08)) 0, rgba(7, 7, 10, 0.97) calc(var(--nf-vh) * 0.85)),
		var(--nf-room-bg, none) var(--nf-bg-pos) / var(--nf-bg-w) var(--nf-bg-h) no-repeat #07070a;
}

@media (max-width: 781px) {
	body.nf-packing main.nf-room::before,
	body.nf-packing--checkout main.nf-room::before,
	body.nf-packing--confirm main.nf-room::before {
		background:
			linear-gradient(180deg, rgba(7, 7, 10, var(--nf-room-dim, 0.62)) 0, rgba(7, 7, 10, 0.96) calc(var(--nf-vh) * 0.7)),
			var(--nf-room-bg-small, none) var(--nf-bg-pos) / var(--nf-bg-w) var(--nf-bg-h) no-repeat #07070a;
	}
}

body.nf-packing main.nf-room > * {
	box-sizing: border-box;
	max-width: 1280px;
	margin-inline: auto !important;
	margin-block-start: 0;
}

/* The checkout's footer and the bag's meet the room with no gap. */
body.nf-packing .wp-site-blocks > main.nf-room + footer,
body.nf-packing .wp-site-blocks > main.nf-room ~ footer,
body.nf-packing .nf-cofoot {
	margin-top: 0 !important;
}

/* --- The head band ------------------------------------------------------- */

.nf-room__head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 1.1rem 2rem;
	margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem) !important;
	color: #fff;
}

.nf-room__kicker {
	margin: 0 0 0.9rem;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.72);
}

body.nf-packing .nf-room__title {
	margin: 0 !important;
	color: #fff !important;
	font-size: clamp(2.6rem, 6.2vw, 4.9rem) !important;
	font-weight: 700 !important;
	line-height: 0.98 !important;
	letter-spacing: -0.04em !important;
}

body.nf-packing .nf-room__head--checkout .nf-room__title {
	font-size: clamp(2.2rem, 4.6vw, 3.4rem) !important;
	font-weight: 400 !important;
	letter-spacing: -0.03em !important;
}

.nf-room__aside {
	margin: 0 0 0.4rem;
	font-size: 0.95rem;
	line-height: 1.45;
	text-align: right;
	color: rgba(255, 255, 255, 0.82);
}

/* The three steps: a hairline, and the step you are on underlined in blue. */
.nf-steps {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem clamp(1.75rem, 6vw, 5rem);
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.nf-room__head--checkout .nf-steps {
	order: -1;
	margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.nf-steps__step {
	position: relative;
	margin: 0;
	padding: 0.95rem 0 0.7rem;
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.62);
}

.nf-steps__step a,
.nf-steps__step a:visited {
	color: inherit !important;
	text-decoration: none;
	background-image: none !important;
}

.nf-steps__step a:hover {
	color: #fff !important;
}

.nf-steps__no {
	margin-right: 0.3rem;
	font-variant-numeric: tabular-nums;
}

.nf-steps__step[aria-current="step"] {
	color: #fff;
}

.nf-steps__step[aria-current="step"]::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background: #6b8aff;
	box-shadow: 0 0 10px rgba(0, 0, 254, 0.7);
}

.nf-steps__step.is-done {
	color: rgba(255, 255, 255, 0.82);
}

.nf-room__label {
	margin: 0 0 1rem !important;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.66);
}

@media (max-width: 600px) {
	.nf-room__head {
		grid-template-columns: 1fr;
	}

	.nf-room__aside {
		display: none;
	}

	.nf-steps {
		justify-content: space-between;
		gap: 0.25rem 1rem;
	}

	.nf-steps__step {
		font-size: 0.78rem;
	}
}

/* --- The empty bag --------------------------------------------------------- */

body.nf-packing main.nf-room > .nf-room__empty {
	display: none;
	max-width: 36rem !important;
	/* Lined up with the head band's left edge, not centred. */
	margin: 0 0 clamp(2rem, 5vw, 3rem) max(0px, calc((100% - 1280px) / 2)) !important;
	padding: clamp(1.75rem, 4vw, 2.5rem);
	background: rgba(8, 8, 11, 0.86);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: #fff;
}

body.nf-packing--bag.nf-bag-empty main.nf-room > .nf-room__empty {
	display: block;
}

body.nf-packing--bag.nf-bag-empty .nf-room__label,
body.nf-packing--bag.nf-bag-empty .nf-steps {
	display: none;
}

.nf-room__empty-kicker {
	margin: 0 0 0.9rem;
	font-size: 0.7rem;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #9fb2ff;
}

body.nf-packing .nf-room__empty-title {
	margin: 0 0 1.75rem !important;
	color: #fff !important;
	font-size: clamp(1.9rem, 4vw, 2.6rem) !important;
	font-weight: 700 !important;
	line-height: 1.05 !important;
	letter-spacing: -0.03em !important;
}

body.nf-packing a.nf-room__empty-link,
body.nf-packing a.nf-room__empty-link:visited {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #fff !important;
	font-size: 1rem;
	text-decoration: none;
	background-image: none !important;
}

body.nf-packing a.nf-room__empty-link:hover {
	color: #9fb2ff !important;
}

/* WooCommerce's own empty message steps aside for the card; "New in" stays. */
body.nf-packing .wp-block-woocommerce-empty-cart-block > .wc-block-cart__empty-cart__title,
body.nf-packing .wp-block-woocommerce-empty-cart-block > .wp-block-separator {
	display: none !important;
}

body.nf-packing .wp-block-woocommerce-empty-cart-block > h2 {
	margin: 0 0 1.25rem !important;
	text-align: left !important;
	font-size: 0.72rem !important;
	font-weight: 500 !important;
	letter-spacing: 0.22em !important;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7) !important;
}

/* --- The bag: the pieces on the table ---------------------------------- */

body.nf-packing .wc-block-cart__main {
	padding-right: 0 !important;
}

body.nf-packing .wc-block-cart__main table.wc-block-cart-items {
	display: block;
	width: 100%;
	margin: 0;
	border: 0;
}

body.nf-packing table.wc-block-cart-items thead {
	display: none;
}

body.nf-packing table.wc-block-cart-items tbody {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1.75rem, 3vw, 2.5rem) clamp(1rem, 2vw, 1.5rem);
}

body.nf-packing tr.wc-block-cart-items__row {
	position: relative;
	container-type: inline-size;
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) auto !important;
	grid-template-rows: auto auto !important;
	gap: 0.95rem 1rem;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
}

body.nf-packing tr.wc-block-cart-items__row > td {
	display: block;
	width: auto !important;
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	vertical-align: top;
}

/* The photo, on stone, with a strip along the bottom. */
body.nf-packing tr.wc-block-cart-items__row > td.wc-block-cart-item__image {
	grid-column: 1 / -1 !important;
	grid-row: 1 !important;
	position: relative;
	box-sizing: border-box;
	aspect-ratio: 1 / 0.92;
	padding: 6% 9% calc(1.9rem + 7%) !important;
	background:
		linear-gradient(0deg, #3a3c42 0 1.9rem, transparent 1.9rem),
		radial-gradient(120% 90% at 50% 20%, #e4e3dd, var(--nf-stone) 70%);
	box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.45);
}

body.nf-packing td.wc-block-cart-item__image a {
	display: block;
	width: 100%;
	height: 100%;
}

body.nf-packing td.wc-block-cart-item__image img {
	display: block;
	width: 100% !important;
	max-width: none !important;
	height: 100% !important;
	object-fit: contain;
	mix-blend-mode: multiply;
	background: transparent !important;
}

/* "NULLIFIER" on the strip under the photo. */
body.nf-packing td.wc-block-cart-item__image::after {
	content: "NULLIFIER";
	position: absolute;
	left: 0.9rem;
	bottom: 0;
	height: 1.9rem;
	line-height: 1.9rem;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.24em;
	color: rgba(255, 255, 255, 0.8);
}

/* The garment's tag on the photo: "HOODIE" and the size (packing.js). */
body.nf-packing tr.wc-block-cart-items__row[data-nf-garment]::before,
body.nf-packing tr.wc-block-cart-items__row[data-nf-size]::after {
	position: absolute;
	top: calc(100cqw * 0.92 - 1.9rem - 2.6rem);
	z-index: 1;
	height: 1.9rem;
	line-height: 1.9rem;
	font-size: 0.66rem;
	letter-spacing: 0.14em;
	color: var(--nf-ink);
	pointer-events: none;
}

body.nf-packing tr.wc-block-cart-items__row[data-nf-garment]::before {
	content: attr(data-nf-garment);
	left: 9%;
	width: min(52%, 13rem);
	padding: 0 0.75rem;
	box-sizing: border-box;
	background: #fbfbf8;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

body.nf-packing tr.wc-block-cart-items__row[data-nf-size]::after {
	content: attr(data-nf-size);
	left: calc(9% + min(52%, 13rem) - 2.4rem);
	width: 1.8rem;
	font-weight: 700;
	text-align: right;
}

/* Name, colour, size and quantity under the photo; the line total beside. */
body.nf-packing tr.wc-block-cart-items__row > td.wc-block-cart-item__product {
	grid-column: 1 !important;
	grid-row: 2 !important;
	min-width: 0;
}

body.nf-packing tr.wc-block-cart-items__row > td.wc-block-cart-item__total {
	grid-column: 2 !important;
	grid-row: 2 !important;
	text-align: right;
}

body.nf-packing .wc-block-cart-items .wc-block-components-product-name {
	display: block;
	font-size: clamp(1.1rem, 1.6vw, 1.35rem) !important;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

body.nf-packing .wc-block-cart-item__total .wc-block-components-product-price {
	font-size: 0.95rem;
	color: #fff;
}

body.nf-packing .wc-block-cart-items .wc-block-components-product-metadata {
	margin-top: 0.35rem;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.7);
}

/* One piece on a phone gets the whole width. */
@media (max-width: 600px) {
	body.nf-packing table.wc-block-cart-items tbody:has(> tr:only-child) {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 480px) {
	body.nf-packing table.wc-block-cart-items tbody {
		gap: 1.5rem 0.75rem;
	}

	body.nf-packing tr.wc-block-cart-items__row {
		grid-template-columns: minmax(0, 1fr) !important;
		grid-template-rows: auto auto auto !important;
		gap: 0.6rem;
	}

	body.nf-packing tr.wc-block-cart-items__row > td.wc-block-cart-item__total {
		grid-column: 1 !important;
		grid-row: 3 !important;
		text-align: left;
	}

	body.nf-packing td.wc-block-cart-item__total .wc-block-cart-item__total-price-and-sale-badge-wrapper {
		align-items: flex-start;
	}

	body.nf-packing tr.wc-block-cart-items__row[data-nf-garment]::before {
		width: 64%;
		font-size: 0.58rem;
		padding: 0 0.5rem;
	}

	body.nf-packing tr.wc-block-cart-items__row[data-nf-size]::after {
		left: calc(9% + 64% - 2.2rem);
		font-size: 0.6rem;
	}
}

/* --- The packing slip (bag and checkout) ------------------------------- */

body.nf-packing .wc-block-cart__sidebar,
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block {
	position: relative;
	box-sizing: border-box;
	padding: 1.4rem 1.4rem 2.4rem !important;
	background: var(--nf-paper) !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--nf-ink);
	/* A torn-paper edge along the bottom. */
	-webkit-mask:
		linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
		conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 9px repeat-x;
	mask:
		linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat,
		conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 9px repeat-x;
}

body.nf-packing .wc-block-cart__sidebar *:not(.wc-block-components-button):not(.wc-block-components-button *):not(.wc-block-components-chip):not(.wc-block-components-chip *),
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block *:not(.wc-block-components-chip):not(.wc-block-components-chip *):not(.wc-block-components-order-summary-item__quantity):not(.wc-block-components-order-summary-item__quantity *) {
	color: var(--nf-ink) !important;
	border-color: var(--nf-rule-dark) !important;
}

body.nf-packing .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block,
body.nf-packing .wc-block-cart__sidebar .wc-block-components-totals-wrapper,
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-wrapper {
	background: transparent !important;
	border-color: var(--nf-rule-dark) !important;
	padding-inline: 0 !important;
}

/* The slip's head, written by packing.js. */
.nf-slip {
	margin-bottom: 0.5rem;
}

.nf-slip__top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin: 0 0 0.9rem !important;
	padding-bottom: 0.7rem;
	border-bottom: 2px solid var(--nf-ink);
	font-size: 0.64rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.nf-slip__mark {
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.nf-slip__title {
	margin: 0 0 1rem !important;
	font-size: clamp(1.6rem, 2.4vw, 1.9rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.nf-slip__items {
	display: grid;
	gap: 0.85rem;
	margin: 0 0 0.5rem !important;
	padding: 0 0 1rem !important;
	list-style: none;
	border-bottom: 1px dashed rgba(18, 18, 22, 0.35);
}

.nf-slip__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.15rem 1rem;
	margin: 0;
	font-size: 0.85rem;
}

.nf-slip__price {
	font-variant-numeric: tabular-nums;
}

.nf-slip__meta {
	grid-column: 1 / -1;
	font-size: 0.72rem;
	color: var(--nf-ink-2) !important;
}

/* Our head replaces the block's own heading, once it is there. */
body.nf-packing .wp-block-woocommerce-cart-order-summary-block > .wc-block-cart__totals-title {
	display: none !important;
}

/* The totals: small print, then the total large. */
body.nf-packing .wc-block-cart__sidebar .wc-block-components-totals-item,
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-item {
	font-size: 0.85rem;
}

body.nf-packing .wc-block-components-totals-footer-item {
	flex-wrap: wrap;
	align-items: baseline;
}

body.nf-packing .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	flex: 1 1 100%;
	font-size: 0.7rem !important;
	font-weight: 400 !important;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--nf-ink-2) !important;
}

body.nf-packing .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.nf-packing .wc-block-components-totals-footer-item .wc-block-components-totals-item__value .wc-block-formatted-money-amount {
	font-size: clamp(2rem, 3.2vw, 2.4rem) !important;
	font-weight: 400 !important;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

body.nf-packing .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	margin-left: 0 !important;
	margin-right: auto;
}

/* The coupon chip, and links, dark on the paper. */
body.nf-packing .wc-block-cart__sidebar .wc-block-components-chip,
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-chip {
	background: transparent !important;
	border: 1px solid rgba(18, 18, 22, 0.35) !important;
	color: var(--nf-ink) !important;
}

body.nf-packing .wc-block-cart__sidebar .wc-block-components-chip *,
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-chip * {
	color: var(--nf-ink) !important;
	fill: currentColor;
}

body.nf-packing .wc-block-cart__sidebar a:not(.wc-block-components-button),
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block a {
	text-decoration: underline !important;
	text-underline-offset: 0.2em;
	background-image: none !important;
}

/* Checkout, in blue, with its arrow. */
body.nf-packing .wc-block-cart__submit-container .wc-block-components-button {
	position: relative;
	justify-content: space-between !important;
	min-height: 3.25rem;
	padding: 0.9rem 1.1rem !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #0000fe !important;
	color: #fff !important;
	font-size: 0.95rem !important;
	font-weight: 500 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

body.nf-packing .wc-block-cart__submit-container .wc-block-components-button * {
	color: #fff !important;
}

body.nf-packing .wc-block-cart__submit-container .wc-block-components-button::after {
	content: "\2192";
	font-size: 1.1rem;
	transition: transform 0.2s ease;
}

body.nf-packing .wc-block-cart__submit-container .wc-block-components-button:hover {
	background: #1a1aff !important;
}

body.nf-packing .wc-block-cart__submit-container .wc-block-components-button:hover::after {
	transform: translateX(3px);
}

body.nf-packing .wc-block-cart__submit-container .wc-block-components-button:focus-visible {
	outline: 2px solid var(--nf-ink);
	outline-offset: 3px;
}

/* On a phone the bag's summary comes after the pieces, still on paper. */
@media (max-width: 781px) {
	body.nf-packing .wc-block-cart__sidebar {
		margin-top: 1.5rem;
	}
}

/* --- The checkout -------------------------------------------------------- */

/* The form sits on the room, on a quiet glass so the fields always read. */
body.nf-packing--checkout .wc-block-checkout__main {
	padding: clamp(1.25rem, 3vw, 2rem) !important;
	background: rgba(8, 8, 12, 0.62);
	border: 1px solid rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

body.nf-packing--checkout .wc-block-checkout__actions .wc-block-components-button,
body.nf-packing--checkout .wc-block-components-checkout-place-order-button {
	border-radius: 0 !important;
	background: #0000fe !important;
	color: #fff !important;
}

/* The slip's own title steps aside for ours on a wide screen. On a phone it
   stays: there it is the button that opens and closes the summary. */
body.nf-packing .is-large .wp-block-woocommerce-checkout-order-summary-block:has(> .nf-slip) > .wc-block-components-checkout-order-summary__title,
body.nf-packing .is-medium .wp-block-woocommerce-checkout-order-summary-block:has(> .nf-slip) > .wc-block-components-checkout-order-summary__title {
	display: none !important;
}

body.nf-packing .is-small .wp-block-woocommerce-checkout-order-summary-block > .nf-slip,
body.nf-packing .is-mobile .wp-block-woocommerce-checkout-order-summary-block > .nf-slip {
	display: none;
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__image {
	background: var(--nf-stone);
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__image img {
	mix-blend-mode: multiply;
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__quantity {
	background: var(--nf-ink) !important;
	border: 0 !important;
	color: #fff !important;
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__quantity * {
	color: #fff !important;
}

/* The parcel, resting above the slip on a wide screen. */
body.nf-packing .is-large .wc-block-checkout__sidebar::before {
	content: "NULLIFIER\A NULLIFY THE ORDINARY.";
	display: block;
	box-sizing: border-box;
	width: 72%;
	margin: 0 0 1.25rem 4%;
	padding: 1.4rem 1rem;
	white-space: pre;
	font-size: 0.55rem;
	letter-spacing: 0.16em;
	line-height: 2.2;
	text-align: center;
	color: rgba(255, 255, 255, 0.75);
	background:
		linear-gradient(90deg, transparent 72%, #0000fe 72% 80%, transparent 80%),
		linear-gradient(180deg, #3b3e45, #2b2d33);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.5);
}

body.nf-packing .is-large .wc-block-checkout__sidebar::first-line {
	font-size: 0.95rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	color: #fff;
}

/* --- The parcel moment ---------------------------------------------------- */

.nf-parcel {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	background: rgba(5, 5, 8, 0);
	transition: background-color 0.35s ease;
	pointer-events: none;
}

.nf-parcel.is-on {
	background: rgba(5, 5, 8, 0.78);
}

.nf-parcel__box {
	position: relative;
	width: min(60vw, 17rem);
	aspect-ratio: 1.3;
	opacity: 0;
	transform: translateY(24px) scale(0.92);
	transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nf-parcel.is-on .nf-parcel__box {
	opacity: 1;
	transform: none;
}

.nf-parcel__back {
	position: absolute;
	inset: 22% 0 0;
	background: #24262c;
}

.nf-parcel__inside {
	position: absolute;
	left: 12%;
	right: 12%;
	top: 10%;
	height: 50%;
}

.nf-parcel__front {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 64%;
	z-index: 2;
	background: linear-gradient(180deg, #43464e, #33363c);
	box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.6);
}

.nf-parcel__flap {
	position: absolute;
	bottom: 64%;
	z-index: 3;
	width: 50%;
	height: 22%;
	background: #4b4e56;
	transition: transform 0.4s cubic-bezier(0.5, 0, 0.3, 1.3);
}

.nf-parcel__flap--l {
	left: 0;
	transform-origin: left bottom;
	transform: rotate(-128deg);
}

.nf-parcel__flap--r {
	right: 0;
	transform-origin: right bottom;
	transform: rotate(128deg);
	transition-delay: 0.08s;
}

.nf-parcel.is-closing .nf-parcel__flap--l,
.nf-parcel.is-closing .nf-parcel__flap--r {
	transform: scaleY(0.18) translateY(100%);
}

.nf-parcel__tape {
	position: absolute;
	left: 44%;
	width: 12%;
	top: 34%;
	bottom: 0;
	z-index: 4;
	background: #0000fe;
	box-shadow: 0 0 14px rgba(0, 0, 254, 0.6);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.3s ease 0.28s;
}

.nf-parcel.is-closing .nf-parcel__tape {
	transform: scaleY(1);
}

.nf-parcel__label {
	position: absolute;
	left: 8%;
	bottom: 12%;
	z-index: 5;
	display: grid;
	gap: 0.15rem;
	color: #fff;
	opacity: 0;
	transition: opacity 0.3s ease 0.35s;
}

.nf-parcel__label b {
	font-size: 0.85rem;
	font-weight: 800;
	letter-spacing: 0.18em;
}

.nf-parcel__label small {
	font-size: 0.5rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.nf-parcel.is-closing .nf-parcel__label {
	opacity: 1;
}

.nf-parcel__piece {
	position: fixed;
	z-index: 1;
	object-fit: contain;
	mix-blend-mode: normal;
	transition: transform 0.55s cubic-bezier(0.55, 0, 0.75, 0.2), opacity 0.2s ease 0.4s;
	will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
	.nf-parcel {
		display: none;
	}
}

/* The page's own padding around the cart and checkout (style.css, "CART AND
   CHECKOUT") would indent them away from the head band; the room sets the
   gutter instead. */
body.nf-packing main.nf-room > .wp-block-post-content,
body.nf-packing main.nf-room > .entry-content {
	padding: 0 !important;
}

/* At a quantity of one the unit price only repeats the line total. */
body.nf-packing .wc-block-cart-items__row[data-nf-qty="1"] .wc-block-cart-item__prices {
	display: none;
}

/* The checkout's sidebar is the slip alone: no dark panel around it. */
body.nf-packing .wc-block-checkout__sidebar {
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

/* Each piece on the checkout slip: a small photo on stone, then the words. */
body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item {
	align-items: flex-start;
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__image {
	align-self: flex-start;
	width: 3.5rem !important;
	height: 3.5rem !important;
	padding: 0.25rem;
	box-sizing: border-box;
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
}

body.nf-packing .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary-item__quantity {
	font-size: 0.65rem !important;
}

/*
 * Loading, without the jumps (1.7.2).
 *
 * WooCommerce draws the bag and the checkout in three stages: a static copy
 * holding both the full and the empty bag (.is-loading), then a grey
 * skeleton of a full bag with a Checkout button while it fetches the cart
 * (about two seconds on the live site), then the real thing. Showing either
 * of the first two is what flashed the "old bag", and on an empty bag looked
 * like the page heading for checkout and bouncing back.
 *
 * So nothing of the block shows until packing.js has seen the real bag (its
 * pieces, or the empty bag) or the real checkout form, and put nf-room-ready
 * on the body. Then it fades in. Its space is kept meanwhile, with a thin
 * light moving across it, and if the script never runs the block shows
 * itself anyway after six seconds.
 */
body.nf-packing:not(.nf-room-ready) .wp-block-woocommerce-cart,
body.nf-packing:not(.nf-room-ready) .wp-block-woocommerce-checkout {
	visibility: hidden;
	min-height: 28rem;
	animation: nf-room-safety 0s 6s forwards;
}

@keyframes nf-room-safety {
	to {
		visibility: visible;
		position: static;
	}
}

/*
 * The empty bag (1.7.3): WooCommerce's own "New in" is printed a second time
 * by packing.php, just after the block (.nf-bag-standin), and stands in while
 * the block loads underneath it. Once the real empty bag is there, the copy
 * goes and the real one is simply shown: same content, same place, no fade,
 * so nothing appears to move. The waiting light is only for a full bag.
 */
.nf-bag-standin {
	display: none;
}

body.nf-packing--bag.nf-bag-empty:not(.nf-room-ready) .nf-bag-standin {
	display: block;
	/* The page's block gap would put it 24px lower than the real one. */
	margin-block-start: 0 !important;
	animation: nf-standin-safety 0s 6s forwards;
}

@keyframes nf-standin-safety {
	to {
		visibility: hidden;
		height: 0;
		overflow: hidden;
	}
}

body.nf-packing--bag.nf-bag-empty:not(.nf-room-ready) .wp-block-woocommerce-cart {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	min-height: 0;
}

body.nf-packing--bag.nf-bag-empty:not(.nf-room-ready) main.nf-room > .wp-block-post-content::before {
	content: none;
}

body.nf-packing--bag.nf-bag-empty.nf-room-ready .wp-block-woocommerce-cart {
	animation: none;
}

body.nf-packing:not(.nf-room-ready) main.nf-room > .wp-block-post-content {
	position: relative;
}

body.nf-packing:not(.nf-room-ready) main.nf-room > .wp-block-post-content::before {
	content: "";
	position: absolute;
	top: 3rem;
	left: 0;
	width: min(18rem, 60%);
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(107, 138, 255, 0.9), transparent) no-repeat;
	background-size: 40% 100%;
	animation: nf-room-wait 1.1s ease-in-out infinite;
}

@keyframes nf-room-wait {
	from {
		background-position: -40% 0;
	}
	to {
		background-position: 140% 0;
	}
}

body.nf-packing.nf-room-ready .wp-block-woocommerce-cart,
body.nf-packing.nf-room-ready .wp-block-woocommerce-checkout {
	animation: nf-room-in 0.35s ease both;
}

@keyframes nf-room-in {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.nf-packing.nf-room-ready .wp-block-woocommerce-cart,
	body.nf-packing.nf-room-ready .wp-block-woocommerce-checkout,
	body.nf-packing:not(.nf-room-ready) main.nf-room > .wp-block-post-content::before {
		animation: none;
	}
}

/* Room for the size, colour and quantity menus before they arrive, so the
   line does not jump when nullifier.js adds them a moment after the bag. */
body.nf-packing tr.wc-block-cart-items__row > td.wc-block-cart-item__product {
	min-height: 8.5rem;
}

@media (max-width: 480px) {
	body.nf-packing tr.wc-block-cart-items__row > td.wc-block-cart-item__product {
		min-height: 10rem;
	}
}


/* --- After paying (1.7.7) ------------------------------------------------ */

/*
 * The order confirmation: WooCommerce's own blocks (status, summary, totals,
 * addresses, "What happens now"), unchanged, on the same quiet glass as the
 * checkout form so everything reads over the room's picture.
 */
body.nf-packing--confirm main.nf-room > .nf-receipt {
	padding: clamp(1.25rem, 3.5vw, 2.5rem) !important;
	background: rgba(8, 8, 12, 0.66);
	border: 1px solid rgba(255, 255, 255, 0.08);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

body.nf-packing--confirm .nf-receipt > * {
	max-width: none !important;
}

body.nf-packing--confirm .nf-receipt > * + * {
	margin-block-start: clamp(1.5rem, 3vw, 2.25rem) !important;
}

body.nf-packing--confirm .nf-receipt .wc-block-order-confirmation-status {
	margin-block-start: 0 !important;
}

body.nf-packing--confirm .nf-receipt .wc-block-order-confirmation-status p {
	margin: 0;
	max-width: 52ch;
	font-size: clamp(1.05rem, 1.8vw, 1.25rem);
	font-weight: 400;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.82);
}

/* Steps already done read as done: lit text, a thin line under them. */
body.nf-packing--confirm .nf-steps__step.is-done::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 1px;
	background: rgba(107, 138, 255, 0.45);
}

/* The order's facts as tiles, like the rest of the site's order pages. */
body.nf-packing--confirm .nf-receipt ul.wc-block-order-confirmation-summary-list {
	list-style: none !important;
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 1px !important;
	margin: 0;
	padding: 0 !important;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

body.nf-packing--confirm .nf-receipt .wc-block-order-confirmation-summary-list-item {
	display: flex !important;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 !important;
	padding: 1rem 1.1rem !important;
	background: rgba(10, 10, 14, 0.92);
	border: 0 !important;
}

body.nf-packing--confirm .nf-receipt .wc-block-order-confirmation-summary-list-item__key {
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.6);
}

body.nf-packing--confirm .nf-receipt .wc-block-order-confirmation-summary-list-item__value {
	font-weight: 600;
	color: #fff;
}
