/* Inna Warszawa: „ciepły papier” modułu Brdy przeniesiony na koszyk, zamówienie
   i podziękowanie. Warstwa nad checkout.css: podmienia tokeny, typografię,
   pola i przyciski oraz dokłada kopertę, jedną propozycję i listę zaufania. */

.iwcd-flow {
	--iwcd-black: #1f1d19;
	--iwcd-ink: #1f1d19;
	--iwcd-paper: #f7f3ec;
	--iwcd-white: #fffdf8;
	--iwcd-muted: #5f5b52;
	--iwcd-line: rgb(31 29 25 / .12);
	--iwcd-danger: #a3321f;
	--p-sand: #efe8dd;
	--p-accent: #8a4329;
	--p-accent-soft: #e7b29b;
	--p-shadow: 60 38 20;
	--p-ease: cubic-bezier(.32, .72, 0, 1);
	--p-serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
	--p-radius: 14px;
	background: var(--iwcd-paper);
}

.iwcd-flow .iwcd-page {
	overflow-x: clip;
	background:
		radial-gradient(ellipse 50% 40% at 82% 0%, #eadbc7 0%, transparent 70%),
		radial-gradient(ellipse 40% 36% at 4% 18%, #f1e8dc 0%, transparent 70%),
		var(--iwcd-paper);
}

/* ------------------------------------------------------------ Typografia */

.iwcd-flow .iwcd-page :is(h1, .iwcd-quick-stage-heading h1, .iwcd-cart-items-heading, .cart_totals > h2, .iwcd-success h2) {
	font-family: var(--p-serif) !important;
	font-weight: 400;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.iwcd-flow .iwcd-quick-stage-heading h1 {
	font-size: clamp(40px, 5vw, 64px);
	line-height: .98;
}

.iwcd-flow .iwcd-cart-items-heading,
.iwcd-flow .cart_totals > h2 {
	font-size: clamp(32px, 3.4vw, 44px) !important;
	line-height: 1;
}

.iwcd-flow .iwcd-quick-stage-heading__eyebrow,
.iwcd-flow .iwcd-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 7px 14px 7px 12px;
	border-radius: 999px;
	background: rgb(255 253 248 / .6);
	box-shadow: inset 0 0 0 1px var(--iwcd-line);
	color: var(--iwcd-muted);
	font-size: 10.5px;
	letter-spacing: .2em;
}

.iwcd-flow .iwcd-quick-stage-heading__eyebrow::before,
.iwcd-flow .iwcd-eyebrow::before {
	content: '';
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--p-accent);
}

.iwcd-flow .amount,
.iwcd-flow .order-total .amount {
	font-variant-numeric: lining-nums tabular-nums;
}

.iwcd-flow .order-total .amount,
.iwcd-flow .cart_totals .order-total td {
	font-family: var(--p-serif) !important;
	font-size: 30px;
	font-weight: 400;
	letter-spacing: -.01em;
}

/* ------------------------------------------------------------ Nawigacja kroków */

.iwcd-journey {
	position: sticky;
	z-index: 80;
	top: 0;
	padding: 14px 20px;
	background: rgb(247 243 236 / .82);
	backdrop-filter: blur(16px) saturate(1.3);
	-webkit-backdrop-filter: blur(16px) saturate(1.3);
	box-shadow: inset 0 -1px 0 var(--iwcd-line);
}

.admin-bar .iwcd-journey { top: 32px; }

.iwcd-journey ol {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.iwcd-journey li {
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--iwcd-muted);
	font-size: 13px;
	line-height: 1.2;
}

.iwcd-journey li + li::before {
	content: '';
	width: clamp(16px, 5vw, 56px);
	height: 1px;
	margin-right: 6px;
	background: var(--iwcd-line);
}

.iwcd-journey li > a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px 0 8px;
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
}

.iwcd-journey li > a:hover { background: rgb(31 29 25 / .06); color: var(--iwcd-ink); }

.iwcd-journey li:not(:has(> a)) {
	padding: 0 14px 0 8px;
	min-height: 40px;
	border-radius: 999px;
}

.iwcd-journey__mark {
	position: relative;
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .22);
	transition: background-color .5s var(--p-ease), box-shadow .5s var(--p-ease);
}

.iwcd-journey li.is-current {
	color: var(--iwcd-ink);
	font-weight: 700;
}

.iwcd-journey li.is-current:not(:has(> a)) { background: var(--iwcd-white); box-shadow: inset 0 0 0 1px var(--iwcd-line), 0 10px 24px -18px rgb(var(--p-shadow) / .5); }
.iwcd-journey li.is-current .iwcd-journey__mark { box-shadow: inset 0 0 0 6px var(--p-accent); }
.iwcd-journey li.is-done { color: var(--iwcd-ink); }
.iwcd-journey li.is-done .iwcd-journey__mark { background: var(--iwcd-ink); box-shadow: none; }
.iwcd-journey li.is-done .iwcd-journey__mark::after {
	content: '';
	position: absolute;
	left: 7px;
	top: 5px;
	width: 5px;
	height: 9px;
	border: solid var(--iwcd-paper);
	border-width: 0 2px 2px 0;
	rotate: 45deg;
}

.iwcd-quick-recovery .iwcd-journey { display: none; }

@media (max-width: 599px) {
	.iwcd-journey { padding: 10px 8px; }
	.iwcd-journey li { font-size: 12px; }
	.iwcd-journey li + li::before { width: 10px; margin-right: 2px; }
	.iwcd-journey li:not(.is-current) .iwcd-journey__mark + * { display: none; }
	.iwcd-journey li:not(:has(> a)),
	.iwcd-journey li > a { padding: 0 8px 0 6px; gap: 6px; }
}

/* ------------------------------------------------------------ Panele */

.iwcd-flow .woocommerce-cart-form .cart_item,
.iwcd-flow .cart_totals,
.iwcd-flow form.checkout #order_review,
.iwcd-js .iwcd-flow--quick #order_review.iwcd-review--details,
.iwcd-js .iwcd-flow--quick #order_review.iwcd-review--payment,
.iwcd-flow .iwcd-success__order,
.iwcd-flow .iwcd-success__delivery {
	border: 0 !important;
	border-radius: 24px;
	background: var(--iwcd-white) !important;
	box-shadow:
		0 0 0 6px rgb(31 29 25 / .035),
		0 0 0 7px rgb(31 29 25 / .06),
		inset 0 1px 0 rgb(255 255 255 / .9),
		0 24px 48px -30px rgb(var(--p-shadow) / .35);
}

.iwcd-flow .woocommerce-cart-form .cart_item { margin-bottom: 20px; }
.iwcd-flow .cart_totals { padding: clamp(24px, 3vw, 34px) !important; }

.iwcd-flow .iwcd-cart-product-image,
.iwcd-flow .product-thumbnail img {
	border-radius: 3px;
	box-shadow: 0 1px 2px rgb(var(--p-shadow) / .2), 0 18px 30px -18px rgb(var(--p-shadow) / .5);
}

/* ------------------------------------------------------------ Pola formularza */

.iwcd-flow .iwcd-page .form-row label:not(.checkbox):not(.woocommerce-form__label-for-checkbox) {
	margin-bottom: 8px;
	color: var(--iwcd-ink);
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

.iwcd-flow .form-row label .required {
	color: var(--p-accent);
	text-decoration: none;
}

.iwcd-flow .iwcd-page .form-row :is(input.input-text, select, textarea),
.iwcd-flow .iwcd-page #coupon_code,
.iwcd-flow .iwcd-page .select2-container .select2-selection--single {
	min-height: 54px;
	padding: 14px 16px;
	border: 0 !important;
	border-radius: var(--p-radius) !important;
	background: var(--iwcd-white) !important;
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .16), 0 1px 0 rgb(255 255 255 / .8);
	color: var(--iwcd-ink);
	font-size: 16px !important;
	transition: box-shadow .35s var(--p-ease), background-color .35s var(--p-ease);
}

.iwcd-flow .iwcd-page .form-row :is(input.input-text, select, textarea):hover {
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .32);
}

.iwcd-flow .iwcd-page .form-row :is(input.input-text, select, textarea):focus,
.iwcd-flow .iwcd-page .form-row :is(input.input-text, select, textarea):focus-visible {
	outline: 0;
	box-shadow: inset 0 0 0 2px var(--iwcd-ink), 0 0 0 5px rgb(138 67 41 / .12);
}

.iwcd-flow .iwcd-page .form-row input.input-text::placeholder { color: rgb(31 29 25 / .38); }

/* Pole wypełnione poprawnie dostaje dyskretny znak — postęp widać bez liczenia. */
.iwcd-flow .form-row.woocommerce-validated { position: relative; }
.iwcd-flow .form-row.woocommerce-validated:has(input.input-text:not(:placeholder-shown))::after {
	content: '';
	position: absolute;
	right: 18px;
	bottom: 22px;
	width: 5px;
	height: 10px;
	border: solid var(--p-accent);
	border-width: 0 2px 2px 0;
	rotate: 45deg;
	pointer-events: none;
}

.iwcd-flow .form-row.woocommerce-invalid :is(input.input-text, select) {
	box-shadow: inset 0 0 0 2px var(--iwcd-danger), 0 0 0 5px rgb(163 50 31 / .1) !important;
}

.iwcd-flow .iwcd-page .form-row .description,
.iwcd-flow .iwcd-page .form-row .woocommerce-input-wrapper + .description {
	margin-top: 8px;
	padding: 0;
	background: none;
	color: var(--iwcd-muted);
	font-size: 12.5px;
}

.iwcd-flow .iwcd-page .form-row select.country_to_state--single {
	min-height: 0;
	padding: 4px 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	font-weight: 700;
	appearance: none;
	pointer-events: none;
}

.iwcd-flow .iwcd-page .form-row select { width: 100%; }

.iwcd-flow .iwcd-page :is(.coupon .button, #alsendo_geowidget_show_map_classic_checkout, .checkout_coupon .button) {
	min-height: 48px;
	padding: 10px 22px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--iwcd-ink) !important;
	color: var(--iwcd-paper) !important;
	font: 700 14px/1.2 Lato, Arial, sans-serif !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

.iwcd-flow .iwcd-quantity-control { border: 0 !important; gap: 6px; }

.iwcd-flow .iwcd-field-heading {
	font-family: var(--p-serif) !important;
	font-size: 26px !important;
	font-weight: 400 !important;
	letter-spacing: -.01em;
}

/* Wybory (dostawa, płatność, zgody) jako karty zamiast gołych kółek. */
.iwcd-flow #shipping_method li,
.iwcd-flow .wc_payment_methods > li {
	position: relative;
	margin: 0 0 8px !important;
	padding: 14px 16px !important;
	border: 0 !important;
	border-radius: var(--p-radius);
	background: var(--iwcd-white);
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .12);
	transition: box-shadow .35s var(--p-ease), background-color .35s var(--p-ease);
}

.iwcd-flow #shipping_method li:has(input:checked),
.iwcd-flow .wc_payment_methods > li:has(> input:checked) {
	background: #fff;
	box-shadow: inset 0 0 0 2px var(--iwcd-ink), 0 16px 30px -24px rgb(var(--p-shadow) / .6);
}

.iwcd-flow :is(#shipping_method, .wc_payment_methods) input[type="radio"],
.iwcd-flow .iwcd-page input[type="checkbox"] {
	accent-color: var(--p-accent);
}

/* ------------------------------------------------------------ Przyciski */

.iwcd-flow .iwcd-page :is(.checkout-button, [id="place_order"], .iwcd-quick-navigation__next) {
	position: relative;
	display: flex !important;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-height: 64px;
	padding: 10px 10px 10px 26px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--iwcd-ink) !important;
	color: var(--iwcd-paper) !important;
	font: 700 17px/1.2 Lato, Arial, sans-serif !important;
	letter-spacing: 0 !important;
	text-align: left;
	text-transform: none !important;
	transition: background-color .5s var(--p-ease), transform .5s var(--p-ease);
}

.iwcd-flow .iwcd-page :is(.checkout-button, [id="place_order"], .iwcd-quick-navigation__next)::after {
	content: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgb(255 255 255 / .12);
	font-weight: 400;
	transition: transform .6s var(--p-ease), background-color .5s var(--p-ease);
}

.iwcd-flow .iwcd-page :is(.checkout-button, [id="place_order"], .iwcd-quick-navigation__next):hover { background: var(--p-accent) !important; }
.iwcd-flow .iwcd-page :is(.checkout-button, [id="place_order"], .iwcd-quick-navigation__next):hover::after { transform: translateX(3px); background: rgb(255 255 255 / .2); }
.iwcd-flow .iwcd-page :is(.checkout-button, [id="place_order"], .iwcd-quick-navigation__next):active { transform: scale(.985); }
.iwcd-flow .iwcd-page :is(.checkout-button, [id="place_order"], .iwcd-quick-navigation__next):disabled { opacity: .55; }
.iwcd-flow .iwcd-quick-navigation__next.button::after { display: inline-flex !important; }
.iwcd-flow .iwcd-page .iwcd-quick-navigation__next[hidden] { display: none !important; }

.iwcd-flow .iwcd-page .iwcd-quick-navigation__back {
	min-height: 64px;
	border: 0 !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .2);
	color: var(--iwcd-ink) !important;
}

.iwcd-flow .iwcd-page .iwcd-quick-navigation__back:hover { background: var(--iwcd-white) !important; }

.iwcd-flow .iwcd-page .iwcd-quantity-control__button {
	border-radius: 50%;
	background: var(--iwcd-white);
	color: var(--iwcd-ink);
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .18);
}

.iwcd-flow .iwcd-page .iwcd-quantity-control__button:hover:not(:disabled) { background: var(--iwcd-ink); color: var(--iwcd-paper); }

/* ------------------------------------------------------------ Koperta */

/* Pozioma koperta z wachlarzem pionowych okładek. Rozmiar liczy się od
   szerokości okładki (--cw): wysokość koperty mieści okładkę z zapasem, a
   szerokość rośnie z liczbą tytułów (--n). Etykieta nie pokazuje adresu —
   część przesyłek idzie do punktu odbioru, a dane klienta nie są ozdobą. */

.iwcd-desk {
	display: grid;
	justify-items: center;
	margin: 0 auto clamp(28px, 4vw, 48px);
}

.iwcd-envelope {
	--cw: 84px;
	--n: 1;
	--eh: calc(var(--cw) * 1.58);
	--paper: #fbf6ec;
	--kraft: #e7d8bf;
	margin: 0;
	display: grid;
	justify-items: center;
}

.iwcd-envelope__scene {
	position: relative;
	width: max(calc(var(--eh) * 1.5), calc(var(--cw) * (var(--n) * .66 + 1.1)));
	height: var(--eh);
	margin-top: calc(var(--cw) * .8);
	perspective: 1100px;
	filter: drop-shadow(0 24px 28px rgb(var(--p-shadow) / .2)) drop-shadow(0 2px 3px rgb(var(--p-shadow) / .14));
	transition: width .6s var(--p-ease);
}

.iwcd-envelope__scene > * { position: absolute; }

.iwcd-envelope__back {
	inset: 0;
	z-index: 1;
	border-radius: 5px;
	background: linear-gradient(180deg, #dcc9aa, var(--kraft));
}

.iwcd-envelope__covers { inset: 0; z-index: 2; }

.iwcd-envelope__cover {
	--x: calc(var(--o, 0) * var(--cw) * .66);
	--rot: calc(var(--o, 0) * 3deg);
	position: absolute;
	left: 50%;
	bottom: 6%;
	width: var(--cw) !important;
	height: auto !important;
	max-width: none !important;
	aspect-ratio: 5 / 7;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 1px 2px rgb(var(--p-shadow) / .3), 0 10px 18px -10px rgb(var(--p-shadow) / .55) !important;
	opacity: 0;
	transform: translate(calc(-50% + var(--x)), 0) rotate(var(--rot));
}

.iwcd-envelope__cover.is-in { opacity: 1; transition: transform .6s var(--p-ease), opacity .4s ease; }
.iwcd-envelope__cover.is-dropping { animation: iwcd-drop .95s var(--delay, 0ms) var(--p-ease) both; }
.iwcd-envelope__cover.is-leaving { transition: opacity .4s ease; opacity: 0; }

/* Otwarta koperta w koszyku: okładki wystają górą. Zaklejenie wsuwa je niżej. */
.iwcd-envelope.is-open .iwcd-envelope__cover.is-in { transform: translate(calc(-50% + var(--x)), -42%) rotate(var(--rot)); }

@keyframes iwcd-drop {
	0% { opacity: 0; transform: translate(calc(-50% + var(--x) * 1.6), -170%) rotate(calc(var(--rot) * -3)); }
	25% { opacity: 1; }
	78% { transform: translate(calc(-50% + var(--x)), -38%) rotate(var(--rot)); }
	100% { opacity: 1; transform: translate(calc(-50% + var(--x)), -42%) rotate(var(--rot)); }
}

.iwcd-envelope__front {
	inset: 0;
	z-index: 3;
	border-radius: 5px;
	background:
		linear-gradient(to top right, transparent 49.8%, rgb(31 29 25 / .06) 50%, transparent 50.3%) left bottom / 50% 100% no-repeat,
		linear-gradient(to top left, transparent 49.8%, rgb(31 29 25 / .06) 50%, transparent 50.3%) right bottom / 50% 100% no-repeat,
		var(--paper);
	clip-path: polygon(0 0, 50% 50%, 100% 0, 100% 100%, 0 100%);
}

.iwcd-envelope__flap {
	top: 0;
	left: 0;
	z-index: 4;
	width: 100%;
	height: 56%;
	background: linear-gradient(180deg, #f5ecdd, #eee1cc);
	clip-path: polygon(0 0, 100% 0, 50% 100%);
	transform-origin: top center;
	transform: rotateX(0deg);
	transition: transform .7s var(--p-ease), z-index 0s .35s;
}

.iwcd-envelope.is-open .iwcd-envelope__flap { z-index: 1; transform: rotateX(180deg); }

html:not(.iwcd-js) .iwcd-envelope__cover { opacity: 1; }

/* Etykieta: trzy linie „pisma” rysowane w miarę wypełniania formularza. */
.iwcd-envelope__label {
	left: 50%;
	bottom: 12%;
	z-index: 5;
	display: grid;
	gap: calc(var(--eh) * .06);
	align-content: center;
	width: calc(var(--eh) * .92);
	height: calc(var(--eh) * .36);
	padding: 0 calc(var(--eh) * .1);
	border-radius: 2px;
	background: #fffefa;
	box-shadow: inset 0 0 0 1px rgb(31 29 25 / .14);
	opacity: 0;
	translate: -50% 0;
	transform: rotate(-1.5deg);
	transition: opacity .5s var(--p-ease);
}

.iwcd-envelope__label span {
	display: block;
	height: 1.5px;
	border-radius: 2px;
	background: repeating-linear-gradient(90deg, rgb(31 29 25 / .22) 0 3px, transparent 3px 6px);
}

.iwcd-envelope__label span:nth-child(1) { width: 62%; }
.iwcd-envelope__label span:nth-child(2) { width: 88%; }
.iwcd-envelope__label span:nth-child(3) { width: 48%; }

.iwcd-envelope__label span::after {
	content: '';
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--iwcd-ink);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .6s var(--p-ease);
}

.iwcd-envelope[data-lines="1"] .iwcd-envelope__label span:nth-child(-n+1)::after,
.iwcd-envelope[data-lines="2"] .iwcd-envelope__label span:nth-child(-n+2)::after,
.iwcd-envelope[data-lines="3"] .iwcd-envelope__label span::after { transform: scaleX(1); }

.iwcd-envelope[data-context="checkout"].is-sealed .iwcd-envelope__label { opacity: .85; }
.iwcd-envelope.is-labelled .iwcd-envelope__label {
	opacity: 1 !important;
	box-shadow: 0 1px 2px rgb(var(--p-shadow) / .16), inset 0 0 0 1px rgb(31 29 25 / .06);
	animation: iwcd-stick .7s var(--p-ease) both;
}
.iwcd-envelope.is-labelled .iwcd-envelope__label span::after { transform: scaleX(1); }

@keyframes iwcd-stick {
	0% { transform: translateY(-10px) rotate(-6deg) scale(1.1); }
	60% { transform: translateY(1px) rotate(-1deg) scale(.99); }
	100% { transform: rotate(-1.5deg) scale(1); }
}

.iwcd-envelope__stamp {
	top: 8%;
	right: calc(var(--eh) * .08);
	z-index: 5;
	display: grid;
	place-items: center;
	width: calc(var(--eh) * .24);
	aspect-ratio: 4 / 5;
	border-radius: 1px;
	background: var(--p-accent);
	color: var(--paper);
	font: 400 calc(var(--eh) * .09)/1 var(--p-serif);
	box-shadow: 0 0 0 2.5px #fffdf8, 0 0 0 3.5px rgb(31 29 25 / .12), 0 3px 6px rgb(var(--p-shadow) / .25);
	opacity: 0;
	transform: rotate(4deg) scale(1.5);
}

.iwcd-envelope__stamp span { display: grid; place-items: center; width: calc(100% - 6px); height: calc(100% - 6px); border: 1px dashed rgb(251 246 236 / .6); }
.iwcd-envelope.is-stamped .iwcd-envelope__stamp { animation: iwcd-thump .55s var(--p-ease) .1s both; }

@keyframes iwcd-thump {
	0% { opacity: 0; transform: rotate(-8deg) scale(1.6); }
	70% { opacity: 1; transform: rotate(5deg) scale(.96); }
	100% { opacity: 1; transform: rotate(4deg) scale(1); }
}

.iwcd-envelope__postmark {
	top: 3%;
	right: calc(var(--eh) * .2);
	z-index: 6;
	width: calc(var(--eh) * .8);
	opacity: 0;
	transform: rotate(-12deg) scale(1.2);
}

.iwcd-envelope__postmark svg { display: block; width: 100%; height: auto; overflow: visible; }
.iwcd-envelope__postmark :is(circle, path) { fill: none; stroke: rgb(31 29 25 / .55); stroke-width: 1.6; }
.iwcd-envelope__postmark text { fill: rgb(31 29 25 / .6); font: 700 10px Lato, Arial, sans-serif; letter-spacing: .04em; }
.iwcd-envelope.is-postmarked .iwcd-envelope__postmark { animation: iwcd-ink .5s ease-out both; }

@keyframes iwcd-ink {
	0% { opacity: 0; transform: rotate(-12deg) scale(1.25); }
	40% { opacity: .95; }
	100% { opacity: .85; transform: rotate(-12deg) scale(1); }
}

.iwcd-envelope.is-sent .iwcd-envelope__scene { animation: iwcd-fly 1.3s cubic-bezier(.55, 0, .2, 1) both; }

@keyframes iwcd-fly {
	0% { transform: none; }
	22% { transform: translate(-6px, 8px) rotate(-4deg) scale(1.02); }
	100% { transform: translate(min(60vw, 720px), -70vh) rotate(24deg) scale(.35); opacity: 0; }
}

.iwcd-envelope.is-gone .iwcd-envelope__scene { display: none; }

/* Reakcja na kursor i dotyk: otwarta koperta wychyla książki, zaklejona
   uchyla klapkę. Dotyk przełącza klasę .is-peek na chwilę (envelope.js). */
.iwcd-envelope__scene { -webkit-tap-highlight-color: transparent; }
.iwcd-envelope__cover.is-in { transition-delay: calc((var(--o, 0) + 2) * 35ms); }

@media (hover: hover) {
	.iwcd-envelope:not(.is-sent) .iwcd-envelope__scene:hover .iwcd-envelope__cover.is-in { transform: translate(calc(-50% + var(--x) * 1.3), -60%) rotate(calc(var(--rot) * 2)); }
	.iwcd-envelope.is-sealed:not(.is-sent) .iwcd-envelope__scene:hover .iwcd-envelope__cover.is-in { transform: translate(calc(-50% + var(--x) * 1.2), -34%) rotate(calc(var(--rot) * 1.6)); }
	.iwcd-envelope.is-sealed:not(.is-sent) .iwcd-envelope__scene:hover .iwcd-envelope__flap { z-index: 1; transform: rotateX(180deg); transition: transform .6s var(--p-ease), z-index 0s .25s; }
}

.iwcd-envelope.is-peek:not(.is-sent) .iwcd-envelope__cover.is-in { transform: translate(calc(-50% + var(--x) * 1.3), -60%) rotate(calc(var(--rot) * 2)); }
.iwcd-envelope.is-peek.is-sealed:not(.is-sent) .iwcd-envelope__cover.is-in { transform: translate(calc(-50% + var(--x) * 1.2), -34%) rotate(calc(var(--rot) * 1.6)); }
.iwcd-envelope.is-peek.is-sealed:not(.is-sent) .iwcd-envelope__flap { z-index: 1; transform: rotateX(180deg); transition: transform .6s var(--p-ease), z-index 0s .25s; }

/* Podpis tylko na stronie podziękowania — tam niesie stan płatności. */
.iwcd-envelope__caption {
	min-height: 1.5em;
	max-width: 30em;
	margin: 20px 0 0;
	color: var(--iwcd-muted);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	text-wrap: balance;
}

.iwcd-envelope.is-gone .iwcd-envelope__caption::before {
	content: '';
	display: inline-block;
	width: 26px;
	height: 1px;
	margin-right: 12px;
	vertical-align: middle;
	background: linear-gradient(90deg, transparent, var(--p-accent));
}

/* Koperta jako nagłówek karty zamówienia. */
#order_review .iwcd-envelope {
	--cw: 54px;
	margin: calc(var(--p-pad) * -1) calc(var(--p-pad) * -1) 0;
	padding: 6px 0 30px;
	border-radius: 24px 24px 0 0;
	background:
		radial-gradient(ellipse 70% 90% at 50% 100%, #f1e6d4 0%, transparent 70%),
		linear-gradient(180deg, #f7f0e4, #fbf7ef);
	box-shadow: inset 0 -1px 0 var(--iwcd-line);
}

#order_review .iwcd-envelope__scene { margin-top: 30px; }

.iwcd-flow--received .iwcd-envelope { --cw: 74px; }
.iwcd-flow--received .iwcd-hero .iwcd-eyebrow { justify-self: start; }
.iwcd-flow--received .iwcd-hero .iwcd-eyebrow { background: rgb(255 255 255 / .08); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); color: rgb(247 243 236 / .75); }
.iwcd-flow--received .iwcd-hero .iwcd-envelope__caption { color: rgb(247 243 236 / .75); }
.iwcd-flow--received .iwcd-hero .iwcd-envelope.is-gone .iwcd-envelope__caption { color: var(--iwcd-paper); font-family: var(--p-serif); font-size: 24px; }
.iwcd-flow--received .iwcd-hero .iwcd-envelope__scene { filter: drop-shadow(0 26px 30px rgb(0 0 0 / .45)); }
.iwcd-flow--received .iwcd-success__mark { display: none; }

@media (min-width: 900px) {
	/* Wyższa koperta nie rozpycha wierszy tekstu: zapas biorą puste wiersze 1 i 5. */
	.iwcd-flow--received .iwcd-hero:has(.iwcd-desk) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto auto auto 1fr; column-gap: 48px; }
	.iwcd-flow--received .iwcd-hero:has(.iwcd-desk) > .iwcd-eyebrow { grid-area: 2 / 1; }
	.iwcd-flow--received .iwcd-hero:has(.iwcd-desk) > h1 { grid-area: 3 / 1; }
	.iwcd-flow--received .iwcd-hero:has(.iwcd-desk) > .iwcd-lead { grid-area: 4 / 1; }
	.iwcd-flow--received .iwcd-hero .iwcd-desk { grid-column: 2; grid-row: 1 / -1; align-self: center; margin: 0; }
}

@media (max-width: 599px) {
	.iwcd-envelope { --cw: 64px; }
	.iwcd-desk { margin-bottom: 20px; }
}

/* ------------------------------------------------------------ Karta zamówienia */

.iwcd-flow form.checkout #order_review {
	--p-pad: clamp(22px, 3vw, 32px);
	padding: var(--p-pad) !important;
}

.iwcd-flow #order_review .woocommerce-checkout-review-order-table,
.iwcd-flow #order_review .woocommerce-checkout-review-order-table :is(thead, tbody, tfoot) {
	display: block;
	width: 100%;
	margin: 0;
	border: 0 !important;
	background: none !important;
}

.iwcd-flow #order_review .woocommerce-checkout-review-order-table thead { display: none !important; }

.iwcd-flow #order_review .woocommerce-checkout-review-order-table tr {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 4px 16px;
	padding: 0;
	border: 0 !important;
	background: none !important;
}

.iwcd-flow #order_review .woocommerce-checkout-review-order-table :is(th, td) {
	display: block;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	text-align: left !important;
	font-size: 14px;
	line-height: 1.45;
	letter-spacing: 0;
	text-transform: none;
}

.iwcd-flow #order_review .woocommerce-checkout-review-order-table :is(td.product-total, tfoot td) {
	text-align: right !important;
	font-variant-numeric: lining-nums tabular-nums;
}

/* Łamią się opisy, nigdy kwoty. */
.iwcd-flow #order_review .woocommerce-checkout-review-order-table :is(td, th) { min-width: 0; overflow-wrap: anywhere; }
.iwcd-flow #order_review .amount { white-space: nowrap; }

/* Wspólny przewoźnik dla dwóch paczek (commerce-suite). */
.iwcd-flow #order_review .iwcs-split-shipping > td > p { margin: 0 0 4px; color: var(--iwcd-muted); font-size: 13px; line-height: 1.5; }
.iwcd-flow #order_review .iwcs-split-shipping label small { display: block; color: var(--iwcd-muted); font-size: 12px; font-weight: 400; }
.iwcd-flow #order_review .iwcs-shipment-summary { display: grid; gap: 10px; margin-top: 14px; }
.iwcd-flow #order_review .iwcs-shipment-summary section { padding: 12px 14px; border-radius: 12px; background: rgb(31 29 25 / .035); font-size: 13px; line-height: 1.5; }
.iwcd-flow #order_review .iwcs-shipment-summary :is(ul, p) { margin: 4px 0 0; padding: 0; list-style: none; color: var(--iwcd-muted); }

.iwcd-flow #order_review .woocommerce-checkout-review-order-table :is(th:empty, td:empty) { display: none; }
.iwcd-flow #order_review .woocommerce-checkout-review-order-table td[colspan] { grid-column: 1 / -1; }

/* Pozycje */
.iwcd-flow #order_review tbody { padding: 24px 0 8px !important; }
.iwcd-flow #order_review tbody tr.cart_item { padding: 0 0 18px !important; }
.iwcd-flow #order_review tbody tr.cart_item + tr.cart_item { padding-top: 18px !important; box-shadow: inset 0 1px 0 var(--iwcd-line); }

.iwcd-flow #order_review td.product-name {
	position: relative;
	min-height: 60px;
	padding-left: 58px !important;
	color: var(--iwcd-ink);
	font-weight: 700;
	font-size: 15px !important;
}

.iwcd-flow #order_review .iwcd-review-cover {
	position: absolute;
	top: 2px;
	left: 0;
	width: 42px;
	height: auto;
	aspect-ratio: 5 / 7;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 1px 2px rgb(var(--p-shadow) / .2), 0 8px 14px -8px rgb(var(--p-shadow) / .5);
}

.iwcd-flow #order_review .product-quantity { color: var(--iwcd-muted); font-weight: 400; white-space: nowrap; }

.iwcd-flow #order_review dl.variation {
	display: flex;
	flex-wrap: wrap;
	gap: 0 4px;
	margin: 6px 0 0;
	color: var(--iwcd-muted);
	font-size: 13px;
	font-weight: 400;
}

.iwcd-flow #order_review dl.variation :is(dt, dd, p) { margin: 0; padding: 0; font: inherit; color: inherit; }
.iwcd-flow #order_review td.product-total { font-size: 15px !important; color: var(--iwcd-ink); }

/* Podsumowanie */
.iwcd-flow #order_review tfoot { padding-top: 6px !important; box-shadow: inset 0 1px 0 var(--iwcd-line); }
.iwcd-flow #order_review tfoot tr { padding: 14px 0 0 !important; }
.iwcd-flow #order_review tfoot th { color: var(--iwcd-muted); font-weight: 400; }
.iwcd-flow #order_review tfoot td { color: var(--iwcd-ink); }

.iwcd-flow #order_review tfoot tr:is(.shipping, .woocommerce-shipping-totals) { grid-template-columns: 1fr; gap: 12px; padding-top: 22px !important; }
.iwcd-flow #order_review tfoot tr:is(.shipping, .woocommerce-shipping-totals) > th,
.iwcd-flow #order_review .iwcd-review-label,
.iwcd-flow #order_review tfoot .order-total th {
	color: var(--iwcd-muted);
	font-size: 10.5px !important;
	font-weight: 700;
	letter-spacing: .18em !important;
	text-transform: uppercase !important;
}

.iwcd-flow #order_review tfoot tr:is(.shipping, .woocommerce-shipping-totals) > td { text-align: left !important; white-space: normal; }
.iwcd-flow #order_review #shipping_method { margin: 0; padding: 0; list-style: none; }

.iwcd-flow #order_review tfoot .order-total {
	align-items: end;
	margin-top: 22px;
	padding: 20px 0 0 !important;
	box-shadow: inset 0 1px 0 var(--iwcd-ink);
}

.iwcd-flow #order_review tfoot .order-total th { padding-bottom: 6px !important; }
.iwcd-flow #order_review tfoot .order-total td,
.iwcd-flow #order_review tfoot .order-total .amount { font: 400 36px/1 var(--p-serif) !important; letter-spacing: -.01em; }

/* Wybrana dostawa na kroku płatności */
.iwcd-flow #order_review .iwcd-delivery-summary {
	position: relative;
	margin: 0;
	padding: 24px 0 22px;
	border: 0;
	box-shadow: inset 0 -1px 0 var(--iwcd-line);
}

.iwcd-flow #order_review .iwcd-delivery-summary h2 {
	margin: 0 0 10px;
	color: var(--iwcd-muted);
	font: 700 10.5px/1.4 Lato, Arial, sans-serif !important;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.iwcd-flow #order_review .iwcd-delivery-summary p { margin: 2px 0; color: var(--iwcd-ink); font-size: 14px; line-height: 1.5; }
.iwcd-flow #order_review .iwcd-delivery-summary p:first-of-type { font-weight: 700; }
.iwcd-flow #order_review .iwcd-delivery-summary .iwcd-text-button { top: 14px; right: -8px; font-size: 13px; }

/* Kod rabatowy: widoczny panel, nie ukryty link na dole strony. */
.iwcd-flow .iwcd-lower-coupon {
	max-width: 560px !important;
	margin: 32px auto 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
}

.iwcd-flow .iwcd-lower-coupon form.checkout_coupon {
	display: grid;
	gap: 10px;
	margin: 0 !important;
	padding: 18px 20px !important;
	border: 0 !important;
	border-radius: 20px;
	background: var(--iwcd-white) !important;
	box-shadow: inset 0 0 0 1px var(--iwcd-line);
}

.iwcd-flow .iwcd-lower-coupon label { margin: 0; color: var(--iwcd-ink); font-size: 14px; font-weight: 700; }
.iwcd-flow .iwcd-coupon__row { display: flex; gap: 10px; }
.iwcd-flow .iwcd-coupon__row #coupon_code { flex: 1 1 auto; min-width: 0; min-height: 50px; }
.iwcd-flow .iwcd-coupon__row .button { flex: 0 0 auto; }

@media (max-width: 767px) {
	/* Przyklejony pasek kroków nie może nachodzić na treść pod formularzem. */
	.iwcd-js .iwcd-flow .iwcd-quick-navigation { margin-bottom: 0 !important; }
	.iwcd-flow .iwcd-lower-coupon { margin-top: 24px !important; }
}

/* Powrót do koszyka: link w tekście, nie przycisk w wersalikach */
.iwcd-js .iwcd-flow--quick .iwcd-edit-cart__button {
	gap: 8px;
	color: var(--iwcd-muted) !important;
	font-size: 14px !important;
	font-weight: 400;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none !important;
}

.iwcd-js .iwcd-flow--quick .iwcd-edit-cart__button:hover { color: var(--iwcd-ink) !important; }

/* ------------------------------------------------------------ Jedna propozycja */

.iwcd-offer {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: 14px 18px;
	margin-top: 26px;
	padding: 20px;
	border-radius: 20px;
	background: linear-gradient(180deg, #fffdf8, #fbf5ea);
	box-shadow: inset 0 0 0 1px rgb(138 67 41 / .22), 0 22px 40px -30px rgb(var(--p-shadow) / .5);
	transition: opacity .4s var(--p-ease), transform .4s var(--p-ease);
}

.iwcd-offer.is-leaving { opacity: 0; transform: translateY(8px); }
.iwcd-offer__cover img { display: block; width: 56px; height: auto; border-radius: 2px; rotate: -3deg; box-shadow: 0 10px 18px -10px rgb(var(--p-shadow) / .6); }

.iwcd-offer__eyebrow {
	margin: 0 0 6px;
	color: var(--p-accent);
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
}

.iwcd-flow .iwcd-offer h3 {
	margin: 0 0 6px;
	font-family: var(--p-serif) !important;
	font-size: 23px;
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -.01em;
}

.iwcd-offer__text p:not(.iwcd-offer__eyebrow) { margin: 0; color: var(--iwcd-muted); font-size: 14px; line-height: 1.5; }
.iwcd-offer__text .iwcd-offer__note { margin-top: 8px; color: var(--iwcd-ink); font-weight: 700; }
.iwcd-offer__actions { grid-column: 1 / -1; display: grid; gap: 4px; }

.iwcd-flow .iwcd-page .iwcd-offer__take {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 54px;
	padding: 8px 8px 8px 20px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: inset 0 0 0 1.5px var(--iwcd-ink);
	color: var(--iwcd-ink);
	font: 700 15px/1.2 Lato, Arial, sans-serif;
	cursor: pointer;
	transition: background-color .45s var(--p-ease), color .45s var(--p-ease);
}

.iwcd-flow .iwcd-page .iwcd-offer__take:hover:not(:disabled) { background: var(--iwcd-ink); color: var(--iwcd-paper); }

.iwcd-offer__text p.iwcd-offer__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 2px 0 8px;
	color: var(--iwcd-ink);
	font: 400 26px/1 var(--p-serif);
	white-space: nowrap;
}

.iwcd-offer__price s { color: var(--iwcd-muted); font-size: 16px; }

.iwcd-offer__plus {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: rgb(31 29 25 / .07);
	font-size: 20px;
	font-weight: 400;
}

.iwcd-flow .iwcd-page .iwcd-offer__decline {
	justify-self: center;
	min-height: 40px;
	padding: 6px 12px;
	border: 0;
	background: transparent;
	color: var(--iwcd-muted);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.iwcd-offer__status { margin: 0; min-height: 0; color: var(--iwcd-danger); font-size: 13px; text-align: center; }
.iwcd-offer__status:empty { display: none; }
.iwcd-offer button[aria-busy="true"] { opacity: .6; }

/* ------------------------------------------------------------ Zaufanie */

.iwcd-trust {
	display: grid;
	gap: 10px;
	margin: 22px 0 0;
	padding: 18px 0 0;
	border-top: 1px solid var(--iwcd-line);
	list-style: none;
	color: var(--iwcd-muted);
	font-size: 13px;
	line-height: 1.5;
}

.iwcd-trust li { position: relative; padding-left: 24px; }
.iwcd-trust li::before {
	content: '';
	position: absolute;
	left: 3px;
	top: 3px;
	width: 5px;
	height: 10px;
	border: solid var(--p-accent);
	border-width: 0 2px 2px 0;
	rotate: 45deg;
}

.iwcd-trust a { color: var(--iwcd-ink); text-underline-offset: 3px; }
#order_review .iwcd-trust { margin-bottom: 18px; }

/* Stary pasek postępu i dawne propozycje nie są już renderowane. */
.iwcd-flow .iwcd-quick-progress,
.iwcd-flow .iwcd-steps { display: none !important; }

/* ------------------------------------------------------------ Mniej ruchu */

@media (prefers-reduced-motion: reduce) {
	.iwcd-envelope *,
	.iwcd-envelope .iwcd-envelope__scene { animation: none !important; transition: none !important; }
	.iwcd-envelope__cover.is-dropping { opacity: 1; }
	.iwcd-envelope.is-labelled .iwcd-envelope__label { transform: rotate(-1.5deg); }
	.iwcd-envelope.is-stamped .iwcd-envelope__stamp { opacity: 1; transform: rotate(4deg); }
	.iwcd-envelope.is-postmarked .iwcd-envelope__postmark { opacity: .85; transform: rotate(-12deg); }
}

/* Podsumowanie koszyka: opisy się łamią, kwoty nie. */
.iwcd-flow .cart_totals :is(td, th) { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.iwcd-flow .cart_totals .amount { white-space: nowrap; }
.iwcd-flow .cart_totals .iwcs-split-shipping > td > p { margin: 0 0 10px; color: var(--iwcd-muted); font-size: 13px; line-height: 1.5; }
.iwcd-flow .iwcd-coupon__row .button { width: auto !important; min-width: 0; margin: 0 !important; }
.iwcd-flow .iwcd-coupon__row #coupon_code { width: auto !important; margin: 0 !important; }
.iwcd-flow #order_review :is(.iwcs-split-shipping > td > p, .iwcs-shipment-summary, .iwcs-shipment-summary *) { text-align: left !important; }
.iwcd-flow .cart_totals :is(.iwcs-split-shipping > td > p, .iwcs-shipment-summary, .iwcs-shipment-summary *) { text-align: left !important; }
.iwcd-flow .cart_totals .iwcs-shipment-summary ul { padding-left: 0; list-style: none; }
.iwcd-flow .cart_totals .order-total :is(th, td) { background: none !important; }

/* ------------------------------------------------------------ Ruch koperty (1.10.7) */

/* Okładki w swoich proporcjach: bez przycinania do 5:7, w ramce szerokości
   --cw i wysokości mieszczącej się w kopercie. */
.iwcd-envelope__cover {
	width: auto !important;
	height: auto !important;
	max-width: var(--cw) !important;
	max-height: calc(var(--cw) * 1.45) !important;
	aspect-ratio: auto;
	object-fit: contain;
}

/* Koperta ugina się od dołu, gdy wpada do niej książka (envelope.js → land). */
.iwcd-envelope__scene { transform-origin: 50% 100%; }

/* Spadanie: przyspiesza jak pod wpływem ciężaru, odbija się raz i osiada. */
.iwcd-envelope__cover.is-dropping {
	animation:
		iwcd-drop 1s var(--delay, 0ms) linear both,
		iwcd-appear .22s var(--delay, 0ms) ease-out both;
}

@keyframes iwcd-drop {
	0% {
		transform: translate(calc(-50% + var(--x) * 1.4), -210%) rotate(calc(var(--rot) * -4 - 4deg));
		animation-timing-function: cubic-bezier(.55, 0, .85, .45);
	}
	70% {
		transform: translate(calc(-50% + var(--x)), -38%) rotate(var(--rot));
		animation-timing-function: cubic-bezier(.2, .7, .35, 1);
	}
	85% {
		transform: translate(calc(-50% + var(--x)), -48%) rotate(calc(var(--rot) * .5));
		animation-timing-function: cubic-bezier(.5, 0, .7, 1);
	}
	100% { transform: translate(calc(-50% + var(--x)), -42%) rotate(var(--rot)); }
}

@keyframes iwcd-appear {
	from { opacity: 0; }
	to { opacity: 1; }
}

/* Wyjęcie z koszyka: okładka wysuwa się w górę i znika. */
.iwcd-envelope .iwcd-envelope__cover.is-leaving {
	opacity: 0;
	transform: translate(calc(-50% + var(--x)), -150%) rotate(calc(var(--rot) * -2));
	transition: transform .45s cubic-bezier(.5, 0, .75, 0), opacity .25s ease .2s;
}

/* Odlot łukiem: w poziomie przyspiesza, w pionie najpierw przysiad i wybicie. */
.iwcd-envelope.is-sent .iwcd-envelope__scene {
	animation:
		iwcd-fly-x 1.5s linear both,
		iwcd-fly-y 1.5s linear both,
		iwcd-fly-fade 1.5s linear both;
}

@keyframes iwcd-fly-x {
	0%, 26% { translate: 0 0; animation-timing-function: cubic-bezier(.5, 0, .8, .5); }
	100% { translate: min(62vw, 700px) 0; }
}

@keyframes iwcd-fly-y {
	0% { transform: none; animation-timing-function: cubic-bezier(.3, 0, .3, 1); }
	14% { transform: translateY(6px) scale(1.04, .94); animation-timing-function: cubic-bezier(.2, .8, .3, 1); }
	26% { transform: translateY(-18px) rotate(-5deg) scale(.98, 1.03); animation-timing-function: cubic-bezier(.3, .4, .3, 1); }
	100% { transform: translateY(-78vh) rotate(20deg) scale(.32); }
}

@keyframes iwcd-fly-fade {
	0%, 78% { opacity: 1; }
	100% { opacity: 0; }
}

/* Po odlocie zostaje miejsce po kopercie i kropkowany ślad lotu — strona nie podskakuje. */
.iwcd-envelope.is-gone .iwcd-envelope__scene { display: block; visibility: hidden; }

.iwcd-envelope__scene,
.iwcd-envelope__trail { grid-area: 1 / 1; }

.iwcd-envelope__trail {
	align-self: end;
	justify-self: center;
	width: max(calc(var(--eh) * 1.5), calc(var(--cw) * (var(--n) * .66 + 1.1)));
	height: var(--eh);
	overflow: visible;
	opacity: 0;
	pointer-events: none;
}

.iwcd-envelope__trail path {
	fill: none;
	stroke: var(--p-accent);
	stroke-width: 2;
	stroke-linecap: round;
	stroke-dasharray: 0 8;
	vector-effect: non-scaling-stroke;
}

.iwcd-envelope.is-gone .iwcd-envelope__trail { animation: iwcd-trail .9s var(--p-ease) both; }

@keyframes iwcd-trail {
	from { opacity: 1; clip-path: inset(0 100% 0 0); }
	to { opacity: 1; clip-path: inset(0 0 0 0); }
}

.iwcd-flow--received .iwcd-hero .iwcd-envelope__trail path { stroke: rgb(247 243 236 / .55); }

@media (prefers-reduced-motion: reduce) {
	.iwcd-envelope.is-gone .iwcd-envelope__trail { opacity: 1; }
}

/* ------------------------------------------------------------ Koszyk na telefonie */

.iwcd-cart-bar { display: none; }

@media (max-width: 767px) {
	/* Suma i przycisk zawsze pod kciukiem, dopóki prawdziwy przycisk jest poza ekranem. */
	.iwcd-cart-bar {
		position: fixed;
		z-index: 90;
		right: 0;
		bottom: 0;
		left: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 12px calc(10px + env(safe-area-inset-bottom)) 18px;
		background: rgb(247 243 236 / .9);
		backdrop-filter: blur(16px) saturate(1.3);
		-webkit-backdrop-filter: blur(16px) saturate(1.3);
		box-shadow: inset 0 1px 0 var(--iwcd-line), 0 -20px 40px -30px rgb(var(--p-shadow) / .55);
		transform: translateY(110%);
		transition: transform .45s var(--p-ease);
	}

	.iwcd-cart-bar.is-shown { transform: none; }

	.iwcd-cart-bar__total {
		display: grid;
		gap: 3px;
		min-width: 0;
		margin: 0;
	}

	.iwcd-cart-bar__total span {
		color: var(--iwcd-muted);
		font-size: 10.5px;
		font-weight: 700;
		letter-spacing: .16em;
		line-height: 1.2;
		text-transform: uppercase;
	}

	.iwcd-cart-bar__total strong {
		color: var(--iwcd-ink);
		font: 400 24px/1 var(--p-serif);
		font-variant-numeric: lining-nums tabular-nums;
		white-space: nowrap;
	}

	.iwcd-cart-bar__go {
		display: inline-flex;
		flex: 0 1 auto;
		align-items: center;
		justify-content: center;
		min-height: 52px;
		padding: 0 22px;
		border-radius: 999px;
		background: var(--iwcd-ink);
		color: var(--iwcd-paper);
		font: 700 15px/1.2 Lato, Arial, sans-serif;
		text-align: center;
		text-decoration: none;
	}

	.iwcd-cart-bar__go:active { transform: scale(.98); }

	/* Pasek nie może przykryć stopki z kontaktem i regulaminem. */
	.iwcd-flow--cart .iwcd-footer { padding-bottom: calc(34px + 80px); }

	/* Cele dotyku co najmniej 44 px: ilość i usuwanie pozycji. */
	.iwcd-flow .iwcd-quantity-control {
		width: auto;
		height: 44px;
		grid-template-columns: 44px 34px 44px;
	}

	.iwcd-flow .iwcd-quantity-control__button,
	.iwcd-flow .iwcd-quantity-control .qty { height: 44px; }

	.iwcd-flow .iwcd-quantity-control__button { width: 44px; }

	.iwcd-flow--cart .woocommerce-cart-form tr.cart_item td.product-remove a.remove {
		display: inline-flex;
		align-items: center;
		min-height: 44px;
		padding: 0 2px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iwcd-cart-bar { transition: none; }
}
