/* Vuelta base layer: focus ring, selection, reduced motion, scroll offsets.
   Token variables only (raw values: 0, 1px hairlines). Loaded on the front end and in the editor. */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: var(--wp--custom--border--focus) solid var(--wp--preset--color--focus);
	outline-offset: var(--wp--custom--border--focus-offset);
}

::selection {
	background: var(--wp--preset--color--signature-2);
	color: var(--wp--preset--color--contrast);
}

html {
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

:target,
[id^="comment-"],
#reviews {
	scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height-mobile) + var(--wp--preset--spacing--40));
}

@media (min-width: 1024px) {
	:target,
	[id^="comment-"],
	#reviews {
		scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + var(--wp--custom--layout--header-height) + var(--wp--preset--spacing--40));
	}
}

@media (max-width: 600px) {
	:target,
	[id^="comment-"],
	#reviews {
		scroll-margin-top: calc(var(--wp--custom--layout--header-height-mobile) + var(--wp--preset--spacing--40));
	}
}

/* Dark and photo grounds use the inverse focus ring. */
:where(.is-style-section-deep, .is-style-section-accent, .wp-block-cover) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--wp--preset--color--focus-inverse);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Focus ring for the keyboard only (owner, 2026-10-22): a mouse or touch click shows no ring; Tab still shows the
   store's ring through the :focus-visible rules. WordPress and WooCommerce draw some rings on plain :focus (the quantity
   buttons' inset shadow, plugin outlines), so the pointer case is cleared here, for every control. */
:where(a, button, summary, select, input[type="checkbox"], input[type="radio"], [role="button"], [role="radio"], [role="tab"], [role="option"], [tabindex]):focus:not(:focus-visible) { outline: none !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus:not(:focus-visible) { box-shadow: none; }
