/* Footer tidy v1 (round 8, D-749 / R4; owner 12 Nov 2026), flag eupepsia_footer_tidy_v1, body class eup-ft-tidy1.
 * Loaded only while the flag is on (inc/footer-tidy-v1.php). Port note: FOOTER-TIDY-V1-PORT.md.
 *
 * From 1024 px (phones and the 768-1023 grid are unchanged):
 * 1. "space the text out a bit more ... take advantage of the extra space": every link and contact line gets
 *    --eup-ftt-x more padding above and below. Get in touch is the tallest column (6 padded lines; 12 Nov at 1920:
 *    216 of 273 px, then 57 px free to the gold line), so it grows by 12x and the space under the columns shrinks by
 *    exactly 12x: x = (3vw - 24 px) / 12, at most 2.75 px, the space under the columns never below 24 px.
 * 2. Owner, 12 Nov (after the first before/after): "make it a bit higher ... reduce the black space above ... and
 *    increase the spacing a bit more". The dark space above the logo and the headings drops by about 40 %
 *    (clamp(32px, 3.96vw, 76px) -> clamp(24px, 2.4vw, 46px): 1920 76 -> 46 px, 1440 57 -> 35 px, 1024 41 -> 25 px);
 *    85 % of the height gained goes into the link gaps (12 padded sides in the tallest column), so the footer ends a
 *    few pixels shorter, never taller.
 *    1920: item gap 8.9 -> 18.7 px; 1440: 6.7 -> 13.1 px. */

@media (min-width: 1024px) {
	body.eup-ft-tidy1 #footer.eup-ft6 {
		--eup-ftt-x: clamp(0px, calc((3vw - 24px) / 12), 2.75px);
		--eup-ftt-pt-was: clamp(32px, 3.96vw, 76px);
		--eup-ftt-pt: clamp(24px, 2.4vw, 46px);
		--eup-ftt-y: calc(var(--eup-ftt-x) + (var(--eup-ftt-pt-was) - var(--eup-ftt-pt)) * 0.85 / 12);
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__main {
		padding-top: var(--eup-ftt-pt);
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__list--group .eup-ft6__link,
	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__contact .eup-ft6__line > * {
		padding-bottom: calc(0.235em + var(--eup-ftt-y));
		padding-top: calc(0.235em + var(--eup-ftt-y));
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__top {
		padding-bottom: calc(clamp(28px, 3vw, 57px) - 12 * var(--eup-ftt-x));
	}
}

/* 3. Owner, 12 Nov (phone): the fine print one link per row, like every other footer list, in this order: Privacy
 *    Policy, Terms and Conditions, Return and Refund Policy, Privacy choices, Do Not Sell or Share My Personal
 *    Information (and "Get 10% off" when the opener prints), then the copyright line, then the social rings.
 *    Below 1024 px only; desktop is unchanged. The two blocks become transparent (display: contents) so their
 *    items can be ordered in one column. Row spacing stays the footer's own: under 768 px each row is 44 px
 *    (14 px type, line 1.5, 11.5 px above and below; the Shop rows are 44.25 px), from 768 px the Shop list's
 *    0.235em padding at the footer's type size. */
@media (max-width: 1023.98px) {
	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__base {
		align-items: flex-start;
		flex-direction: column;
		flex-wrap: nowrap;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__base-start,
	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__base-end {
		display: contents;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__list--legal {
		flex-direction: column;
		flex-wrap: nowrap;
		row-gap: 0;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__list--policies {
		order: 1;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__base-end .eup-ft6__list--legal {
		order: 2;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__cta {
		order: 3;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__copy {
		margin-left: 0;
		margin-top: 0;
		order: 4;
	}

	body.eup-ft-tidy1 #footer.eup-ft6 .eup-ft6__base-end .eup-ft6__social {
		align-self: flex-start;
		order: 5;
	}
}
