/*
 * Audit fixes v1 (2026-10-01), flag eupepsia_audit_fixes_v1. See AUDIT-FIXES-PORT.md and
 * inc/enqueue-audit-fixes.php. Loaded after system-v3, header-v3 and footer-v3; every rule is scoped
 * to body.eup-system-v3. Ids in comments are the audit's (research/design/2026-10-01/impeccable-audit).
 */

/* --------------------------------------------------------------------------
 * A4: targets at least 24 px (WCAG 2.2, 2.5.8)
 * ----------------------------------------------------------------------- */

/* Inline links in a sentence: block padding on an inline box enlarges the hit area without moving
   a line. 19 px line + 2 x 3 px = 25 px. */
body.eup-system-v3 .eup-ft3__band-note a,
body.eup-system-v3 .eup-ft3__copy a,
body.eup-system-v3 .eup-ft3__contact a,
body.eup-system-v3 .eup-shop__crumbs a {
	padding-block: 3px;
}

/* MailPoet's consent checkbox: 20 x 20 -> 24 x 24. */
body.eup-system-v3 .eup-ft3__band input[type="checkbox"] {
	height: 24px;
	min-height: 24px;
	min-width: 24px;
	width: 24px;
}

/* "Clear options" on variable products: 18 px tall -> 34 px. */
body.eup-system-v3 a.reset_variations {
	display: inline-block;
	padding-block: 8px;
}

/* Cart quantity (classic and Blocks). */
body.eup-system-v3 .woocommerce-cart-form input.qty,
body.eup-system-v3 .wc-block-components-quantity-selector {
	min-height: 44px;
}

body.eup-system-v3 .wc-block-components-quantity-selector > .wc-block-components-quantity-selector__button {
	min-width: 32px;
}

/* The number field itself was 33 px tall inside the 44 px control. */
body.eup-system-v3 .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	align-self: stretch;
	min-height: 42px;
}

/* --------------------------------------------------------------------------
 * C1: measure. Running text no wider than 72 characters.
 * ----------------------------------------------------------------------- */

body.eup-system-v3 .eup-ft3__disclaimer,
body.eup-system-v3 .eup-shop__disclaimer-text {
	margin-inline: auto;
	max-width: 72ch;
}

/* The contact page (default template, no rail): the text column at 72ch and section rhythm, the
   C2 finding without moving the page to the legal template (which would add counsel placeholders). */
body.eup-system-v3.eup-afx-page-contact #content .col-inner {
	margin-inline: auto;
	max-width: 72ch;
}

body.eup-system-v3.eup-afx-page-contact #content .col-inner h2 {
	margin-bottom: 8px;
	margin-top: 40px;
}

/* --------------------------------------------------------------------------
 * B3: the empty bag
 * ----------------------------------------------------------------------- */

body.eup-system-v3 .eup-afx-empty {
	align-items: center;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 24px auto 48px;
	max-width: 420px;
	padding: 0 16px;
	text-align: center;
}

body.eup-system-v3 .eup-afx-empty__icon {
	align-items: center;
	background: var(--eup3-cream);
	border-radius: 50%;
	color: var(--eup3-ink);
	display: inline-flex;
	height: 88px;
	justify-content: center;
	width: 88px;
}

body.eup-system-v3 .eup-afx-empty__svg {
	height: auto;
	width: 40px;
}

body.eup-system-v3 .eup-afx-empty__title {
	color: var(--eup3-ink);
	font-family: var(--eup3-font);
	font-size: clamp(22px, 1.4vw + 14px, 30px);
	font-weight: 300;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0;
	text-transform: none;
}

body.eup-system-v3 .eup-afx-empty__next,
body.eup-system-v3 .eup-afx-wishlist-next {
	width: 100%;
}

body.eup-system-v3 .eup-afx-empty__next .eup-mc-next__lead,
body.eup-system-v3 .eup-afx-wishlist-next .eup-mc-next__lead {
	color: var(--eup3-ink-soft);
	font-size: 16px;
	margin: 0 0 12px;
}

body.eup-system-v3 .eup-afx-empty__next .eup-btn,
body.eup-system-v3 .eup-afx-wishlist-next .eup-btn {
	justify-content: center;
	width: 100%;
}

/* The checkout steps above the bag: a legacy custom-CSS rule (`body .checkout-breadcrumbs a
   { font-size: .4em !important }`) shrinks them to 9 px on phones; only !important overrides it. */
@media (max-width: 849.98px) {
	body.eup-system-v3 .checkout-page-title .checkout-breadcrumbs,
	body.eup-system-v3 .checkout-page-title .checkout-breadcrumbs a {
		font-size: 14px !important;
		letter-spacing: 0.04em;
	}
}

/* --------------------------------------------------------------------------
 * B4: the wishlist
 * ----------------------------------------------------------------------- */

body.eup-system-v3 .wishlist-title h1 {
	color: var(--eup3-accent-text, var(--eup3-accent));
	font-family: var(--eup3-font);
	font-size: var(--eup3-fs-display, 40px);
	font-weight: 200;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0 0 16px;
	text-transform: none;
}

/* Empty list: no column headings over nothing; the sentence in body size. */
body.eup-system-v3 .wishlist_table:has(.wishlist-empty) thead {
	display: none;
}

body.eup-system-v3 .wishlist_table td.wishlist-empty {
	border: 0;
	color: var(--eup3-ink);
	font-size: 16px;
	padding: 8px 0 16px;
	text-align: left;
	text-transform: none;
}

body.eup-system-v3 .wishlist_table th {
	font-size: 14px;
	letter-spacing: 0;
	text-transform: none;
}

body.eup-system-v3 .eup-afx-wishlist-next {
	margin: 8px 0 48px;
	max-width: 420px;
}

/* --------------------------------------------------------------------------
 * A6: the 404
 * ----------------------------------------------------------------------- */

body.eup-system-v3 .eup-afx-404 {
	padding: clamp(48px, 6vw, 120px) var(--eup3-gutter, 16px);
}

body.eup-system-v3 .eup-afx-404__inner {
	margin: 0 auto;
	max-width: 640px;
}

body.eup-system-v3 .eup-afx-404__title {
	color: var(--eup3-ink);
	font-family: var(--eup3-font);
	font-size: clamp(28px, 2vw + 18px, 44px);
	font-weight: 300;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0 0 16px;
	text-transform: none;
}

body.eup-system-v3 .eup-afx-404__text {
	color: var(--eup3-ink);
	font-size: 16px;
	margin: 0 0 24px;
}

body.eup-system-v3 .eup-afx-404__text a,
body.eup-system-v3 .eup-afx-404 .eup-mc-next a {
	color: var(--eup3-ink);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.eup-system-v3 .eup-afx-search {
	align-items: center;
	background: var(--eup3-pill);
	border-radius: var(--eup3-radius-pill);
	display: flex;
	flex-wrap: wrap;
	margin: 0 0 16px;
	padding: 0 4px 0 20px;
	position: relative;
}

body.eup-system-v3 .eup-afx-search:focus-within {
	outline: 3px solid var(--eup3-focus);
	outline-offset: 2px;
}

body.eup-system-v3 .eup-afx-search__label {
	color: var(--eup3-ink);
	font-size: 14px;
	font-weight: 500;
	left: 0;
	letter-spacing: 0.04em;
	position: absolute;
	text-transform: uppercase;
	top: -28px;
}

body.eup-system-v3 .eup-afx-404 .eup-afx-search {
	margin-top: 40px;
}

body.eup-system-v3 input.eup-afx-search__field {
	background: transparent;
	border: 0;
	box-shadow: none;
	color: var(--eup3-ink);
	flex: 1 1 0;
	font-family: var(--eup3-font);
	font-size: 16px;
	height: 52px;
	margin: 0;
	min-width: 0;
	padding: 0;
}

body.eup-system-v3 input.eup-afx-search__field:focus {
	box-shadow: none;
	outline: 0;
}

body.eup-system-v3 .eup-afx-search__submit {
	align-items: center;
	background: none;
	border: 0;
	color: var(--eup3-ink);
	display: inline-flex;
	height: 44px;
	justify-content: center;
	margin: 0;
	min-height: 44px;
	padding: 0;
	width: 44px;
}

body.eup-system-v3 .eup-afx-search__submit .eup-i3 {
	height: 20px;
	width: auto;
}

/* --------------------------------------------------------------------------
 * D4: the phone drawer's search: one pill, not a white field with 12 px corners inside it.
 * ----------------------------------------------------------------------- */

@media (max-width: 1023.98px) {
	body.eup-system-v3 .eup-hd3 .eup-hd3__nav .eup-hd3__search-field {
		background: transparent;
		border-radius: var(--eup3-radius-pill);
	}

	/* The pill already shows focus (:focus-within ring); a second ring on the field drew two shapes. */
	body.eup-system-v3 .eup-hd3 .eup-hd3__nav .eup-hd3__search-field:focus {
		box-shadow: none;
		outline: 0;
	}
}

/* --------------------------------------------------------------------------
 * D6: Advanced Woo Search suggestions under the v3 header field
 * ----------------------------------------------------------------------- */

/* The wrapper audit-fixes.js puts round the form, for the plugin to bind to; it adds no box.
   The plugin forces square corners on its list (`border-radius: 0 !important`); left as it is. */
.eup-afx-aws {
	display: contents;
}

body.eup-system-v3 .aws-search-result.eup-afx-aws-result {
	background: var(--eup3-ground);
	border: 1px solid var(--eup3-line);
	box-shadow: 0 12px 32px rgba(38, 35, 34, 0.12);
	font-family: var(--eup3-font);
	z-index: 100001;
}

body.eup-system-v3 .eup-afx-aws-result .aws_result_item {
	border-bottom: 1px solid var(--eup3-line);
}

body.eup-system-v3 .eup-afx-aws-result .aws_result_item.hovered,
body.eup-system-v3 .eup-afx-aws-result .aws_result_item:hover {
	background: var(--eup3-surface);
}

body.eup-system-v3 .eup-afx-aws-result .aws_result_title {
	color: var(--eup3-ink);
	font-size: 15px;
	font-weight: 400;
}

body.eup-system-v3 .eup-afx-aws-result .aws_result_price,
body.eup-system-v3 .eup-afx-aws-result .aws_result_excerpt {
	color: var(--eup3-ink-soft);
	font-size: 14px;
}

body.eup-system-v3 .eup-afx-aws-result .aws_search_more,
body.eup-system-v3 .eup-afx-aws-result .aws_search_more a {
	color: var(--eup3-ink);
	font-weight: 500;
}

/* --------------------------------------------------------------------------
 * F1: the body map frame, once audit-fixes.js has sized it to its content (height set inline).
 * ----------------------------------------------------------------------- */

body.eup-system-v3 .eup-bodymap__frame.is-eup-afx-sized {
	min-height: 0;
}
