/**
 * Delivery-country visibility + external-link marker (z8udzkept0 G10/G18, z8udzkeppu G25).
 * Pairs with js/free-delivery-geo.js. Config checked first: nothing to configure,
 * these are runtime show/hide rules for copy that depends on the visitor's country.
 */

/* G10: never flash the English "Free Shipping over £39" before the script has chosen a country. */
html:not(.bfd-ready) .bpp-checkout-trust-row__item:has(img[src*="trust-free-shipping"]) {
	display: none;
}

.bpp-checkout-trust-row__item[hidden],
[data-bonza-free-delivery][hidden],
[data-bonza-free-delivery-item][hidden] {
	display: none !important;
}

/* G18: VidiVet is a UK benefit. Hidden until the delivery country is known to be GB,
   and display:none so the surrounding layout closes up with no gap. */
html:not(.bfd-uk) [data-bonza-uk-only] {
	display: none !important;
}

/* A VidiVet logo image is hidden before the script has run too (the script marks the figure around it). */
html:not(.bfd-uk) img[src*="vidivet" i] {
	display: none !important;
}

/* z8udzkjb4n: fail closed. The nested "Free VidiVet Subscription" accordion, VidiVet links and
   their menu rows are hidden by the stylesheet itself, so a non-UK visitor whose script is blocked
   or slow, or who has JS off, never sees them. They show only once the script confirms GB
   (html.bfd-uk). Page cache cannot know the country, so the default has to be hidden. */
html:not(.bfd-uk) .wp-block-genesis-blocks-gb-accordion:has(img[src*="vidivet" i]),
html:not(.bfd-uk) a[href*="vidivet" i],
html:not(.bfd-uk) li:has(> a[href*="vidivet" i]) {
	display: none !important;
}

/* z8udzkjb4n: the translated Description repeats the buy-box VidiVet panel as a nested accordion
   (the English page has none), so the UK view showed the heading twice. The panel stays. */
.bppm-info-accordion__detail .wp-block-genesis-blocks-gb-accordion:has(img[src*="vidivet" i]) {
	display: none !important;
}

/* Class contract for wrapped copy (PR #1308): .bonza-uk-only shows only when html.bonza-geo-uk,
   .bonza-non-uk-only is hidden only when html.bonza-geo-uk. Before the country resolves neither
   root class exists, so the non-UK variant shows and no VidiVet promise is made. */
html:not(.bonza-geo-uk) .bonza-uk-only,
html.bonza-geo-uk .bonza-non-uk-only {
	display: none !important;
}

/* PR #1308 ships `.bonza-non-uk-only { display: none }` as its own default; undo that for every
   non-UK visitor (and before the country resolves) so the non-UK variant is the one shown. */
html:not(.bonza-geo-uk) .bonza-non-uk-only {
	display: revert;
}

/* G25: new-tab marker on external links. */
.bfd-ext-icon {
	display: inline-block;
	width: 0.8em;
	height: 0.8em;
	margin-inline-start: 0.3em;
	vertical-align: -0.05em;
	flex: none;
}

.bfd-ext-icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.bfd-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
