/* ==========================================================================
   1.8.423 — One button system, site-wide (loaded after type-422.css).
   · Square corners on every text button (no pills).
   · One hover: the left-to-right slide-in fill already used on the add-to-cart
     button (configurator-brand.css) and cart buttons (cart.css) — a background
     gradient that grows from 0% to 100% width. No extra markup or pseudo-elements,
     so it also works on <input type="submit">.
   · Schemes (hover text always readable):
       yellow  #f3c91a / navy text  → navy fill,  yellow text
       navy    #0f143a / white text → yellow fill, navy text
       ghost on navy (white text)   → white fill,  navy text
       outline on light (navy text) → navy fill,  white text
   · Not applied: IDX Cares page, Mold Builder (idxcb-*), cart's own idxcart-btn fill
     (already the same animation), icon/thumbnail controls.
   · :not(#idx-b423) twice lifts specificity above page skins without !important wars.
   ========================================================================== */

/* ---- Shape: square everywhere ---- */
:is(
	.btn, a.button, button.button, input.button, .woocommerce .button, .wp-element-button, .wp-block-button__link,
	input[type="submit"], button[type="submit"], .single_add_to_cart_button, .checkout-button, .add_to_cart_button,
	.svx-pill, .footer-donate-btn, .idx-promo__cta, .apx-gallery__cta, .terms-help__print, .terms-top,
	.lfx__more, .molded-quote-form__btn, .molded-fee__cta, .idxcart-btn, .idxshop-filter-btn,
	.dtfbuild-launch-btn, .dtfbuild-upload-button, .dtf-category-pressing-card__btn, .cn-button,
	.mega-menu__cta-book, .mega-menu__cta-secondary
):not(.idxc-page *):not([class*="idxcb-"]):not(#idx-b423):not(#idx-b423) {
	border-radius: 0 !important;
}

/* ---- Slide fill: shared mechanics ---- */
:is(
	.btn, a.button, button.button, input.button, .woocommerce .button, .wp-element-button, .wp-block-button__link,
	input[type="submit"], button[type="submit"], .single_add_to_cart_button, .checkout-button, .add_to_cart_button,
	.svx-pill, .footer-donate-btn, .idx-promo__cta, .apx-gallery__cta, .terms-help__print, .terms-top,
	.lfx__more, .molded-quote-form__btn, .molded-fee__cta, .idxshop-filter-btn,
	.dtfbuild-launch-btn, .dtfbuild-upload-button, .dtf-category-pressing-card__btn, .cn-button,
	.mega-menu__cta-book, .mega-menu__cta-secondary
):not(.idxc-page *):not([class*="idxcb-"]):not(.idxcart-btn):not(#idx-b423):not(#idx-b423) {
	background-image: linear-gradient(var(--b423-fill, #0f143a), var(--b423-fill, #0f143a)) !important;
	background-repeat: no-repeat !important;
	background-position: left center !important;
	background-size: 0% 100% !important;
	transition: background-size .38s cubic-bezier(.2, .7, .2, 1), color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease !important;
}
:is(
	.btn, a.button, button.button, input.button, .woocommerce .button, .wp-element-button, .wp-block-button__link,
	input[type="submit"], button[type="submit"], .single_add_to_cart_button, .checkout-button, .add_to_cart_button,
	.svx-pill, .footer-donate-btn, .idx-promo__cta, .apx-gallery__cta, .terms-help__print, .terms-top,
	.lfx__more, .molded-quote-form__btn, .molded-fee__cta, .idxshop-filter-btn,
	.dtfbuild-launch-btn, .dtfbuild-upload-button, .dtf-category-pressing-card__btn, .cn-button,
	.mega-menu__cta-book, .mega-menu__cta-secondary
):not(.idxc-page *):not([class*="idxcb-"]):not(.idxcart-btn):not(#idx-b423):not(#idx-b423):is(:hover, :focus-visible) {
	background-color: var(--b423-bg, #f3c91a) !important;
	background-size: 100% 100% !important;
	color: var(--b423-text, #f3c91a) !important;
	-webkit-text-fill-color: var(--b423-text, #f3c91a);
	border-color: var(--b423-fill, #0f143a) !important;
}
:is(
	.btn, a.button, button.button, input.button, .woocommerce .button, .wp-element-button, .wp-block-button__link,
	input[type="submit"], button[type="submit"], .single_add_to_cart_button, .checkout-button, .add_to_cart_button,
	.svx-pill, .footer-donate-btn, .idx-promo__cta, .apx-gallery__cta, .terms-help__print, .terms-top,
	.lfx__more, .molded-quote-form__btn, .molded-fee__cta, .idxshop-filter-btn,
	.dtfbuild-launch-btn, .dtfbuild-upload-button, .dtf-category-pressing-card__btn, .cn-button,
	.mega-menu__cta-book, .mega-menu__cta-secondary
):not(.idxc-page *):not([class*="idxcb-"]):not(.idxcart-btn):not(#idx-b423):not(#idx-b423):is(:hover, :focus-visible) :is(span, strong, em, svg, i) {
	color: inherit !important; -webkit-text-fill-color: inherit;
}

/* ---- Schemes ---- */
/* Navy buttons → yellow fill, navy text */
:is(.btn--dark, a.button, button.button, input.button, .woocommerce .button, .add_to_cart_button, .terms-top,
	.idxshop-filter-btn, .dtf-category-pressing-card__btn, .mega-menu__cta-secondary):not(.single_add_to_cart_button):not(.btn--primary):not(.checkout-button):not(.wc-backward):not(#idx-b423):not(#idx-b423) {
	--b423-bg: #0f143a; --b423-fill: #f3c91a; --b423-text: #0f143a;
}
/* Ghost / outline on navy → white fill, navy text ("Email for a quote") */
:is(.btn--ghost, .btn--outline, .svx-pill--ghost, .terms-help__print):not(#idx-b423):not(#idx-b423) {
	--b423-bg: transparent; --b423-fill: #ffffff; --b423-text: #0f143a;
}
/* Outline on light backgrounds (navy text) → navy fill, white text */
:is(.lfx__more):not(#idx-b423):not(#idx-b423) {
	--b423-bg: transparent; --b423-fill: #0f143a; --b423-text: #ffffff;
}
/* Yellow buttons (explicit, so they win over generic .button above) → navy fill, yellow text */
:is(.btn--primary, .svx-pill--yellow, .single_add_to_cart_button, .checkout-button, .wc-backward, .footer-donate-btn,
	.idx-promo__cta, .apx-gallery__cta, .molded-quote-form__btn, .molded-fee__cta):not(#idx-b423):not(#idx-b423) {
	--b423-bg: #f3c91a; --b423-fill: #0f143a; --b423-text: #f3c91a;
}

/* ---- Reduced motion: same colours, no slide ---- */
@media (prefers-reduced-motion: reduce) {
	:is(
		.btn, a.button, button.button, input.button, .woocommerce .button, .wp-element-button, .wp-block-button__link,
		input[type="submit"], button[type="submit"], .single_add_to_cart_button, .checkout-button, .add_to_cart_button,
		.svx-pill, .footer-donate-btn, .idx-promo__cta, .apx-gallery__cta, .terms-help__print, .terms-top,
		.lfx__more, .molded-quote-form__btn, .molded-fee__cta, .idxshop-filter-btn,
		.dtfbuild-launch-btn, .dtfbuild-upload-button, .dtf-category-pressing-card__btn, .cn-button,
		.mega-menu__cta-book, .mega-menu__cta-secondary
	):not(.idxc-page *):not([class*="idxcb-"]):not(.idxcart-btn):not(#idx-b423):not(#idx-b423) {
		transition: none !important;
	}
}
