/* ETF Site: pill buttons. Core Button blocks with the class etf-site-cta (primary: filled #0071e3, white text
   4.70:1) or etf-site-cta etf-site-cta--secondary (1px outline in the link blue: #0066cc on light, #2997ff on
   black), and the 404 button. Targets max(44px, 2.75rem). Hover and press darken the fill (white text stays above
   4.5:1); press also scales to 0.97 on pointer-down (100 ms) and releases on the damped curve. Selectors outrank
   the parent theme's element button styles. */
.wp-block-buttons:has(> .etf-site-cta) {
	gap: 0.75rem 1rem;
}

.wp-block-button.etf-site-cta > .wp-block-button__link,
.etf-site-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: var(--etf-site-hit);
	min-height: var(--etf-site-hit);
	padding: 0 1.375rem;
	border: 1px solid var(--etf-site-cta);
	border-radius: 9999px;
	background-color: var(--etf-site-cta);
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 400;
	letter-spacing: -0.01em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: transform var(--etf-site-dur) var(--etf-site-ease), background-color var(--etf-site-dur) var(--etf-site-ease);
}

.wp-block-button.etf-site-cta--secondary > .wp-block-button__link {
	border-color: var(--etf-site-cta-2);
	background-color: transparent;
	color: var(--etf-site-cta-2);
}

@media (hover: hover) and (pointer: fine) {
	.wp-block-button.etf-site-cta > .wp-block-button__link:hover,
	.etf-site-button:hover {
		background-color: var(--etf-site-cta-hover);
		color: #fff;
	}

	.wp-block-button.etf-site-cta--secondary > .wp-block-button__link:hover {
		background-color: color-mix(in srgb, var(--etf-site-cta-2) 8%, transparent);
		color: var(--etf-site-cta-2);
	}
}

.wp-block-button.etf-site-cta > .wp-block-button__link:active,
.etf-site-button:active {
	background-color: var(--etf-site-cta-press);
	transform: scale(0.97);
	transition-duration: var(--etf-site-dur-press);
	transition-timing-function: var(--etf-site-ease-press);
}

.wp-block-button.etf-site-cta--secondary > .wp-block-button__link:active {
	background-color: color-mix(in srgb, var(--etf-site-cta-2) 16%, transparent);
}

/* Phones: hero actions stacked, full width */
@media (width < 30em) {
	.etf-site-hero .wp-block-buttons {
		flex-direction: column;
		align-items: stretch;
	}

	.etf-site-hero .wp-block-button,
	.etf-site-hero .wp-block-button__link {
		width: 100%;
	}
}

/* Reduced motion: no scaling, the darker fill alone confirms the press */
@media (prefers-reduced-motion: reduce) {
	.wp-block-button.etf-site-cta > .wp-block-button__link,
	.etf-site-button {
		transition: none;
	}

	.wp-block-button.etf-site-cta > .wp-block-button__link:active,
	.etf-site-button:active {
		transform: none;
	}
}

/* Increased contrast: a heavier outline on the secondary pill (the filled one is 4.5:1 or more on white and black) */
@media (prefers-contrast: more) {
	.wp-block-button.etf-site-cta--secondary > .wp-block-button__link {
		border-width: 2px;
		border-color: currentColor;
	}
}

@media (forced-colors: active) {
	.wp-block-button.etf-site-cta > .wp-block-button__link,
	.etf-site-button {
		border: 1px solid ButtonText;
	}
}
