/* ==========================================================================
   1.8.450 — TEAM IDX Checkout (Woo Blocks) + Cart button/alignment polish.
   Classic cart layout stays in cart.css; this file brands Blocks checkout and
   unifies Place Order / Proceed to Checkout slide-fill buttons.
   Navy #0f143a · Yellow #F3C91A · Mist #e2e0e8 · Oswald headings · Montserrat 16px+
   ========================================================================== */

:root {
	--idx-chk-navy: #0f143a;
	--idx-chk-yellow: #f3c91a;
	--idx-chk-mist: #e2e0e8;
	--idx-chk-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---- Page shell: mist ground, no sideways scroll ---- */
.checkout-page > .section--white,
body.woocommerce-checkout .checkout-page > .section {
	background: var(--idx-chk-mist);
}
.checkout-page .entry-content.prose,
.checkout-page .wp-block-woocommerce-checkout,
.cart-page .idxcart-wrap {
	max-width: 1120px;
	overflow-x: clip;
}
.checkout-page .entry-content.prose > *:not(.alignwide):not(.wp-block-woocommerce-checkout) {
	max-width: none;
}
.checkout-page h1.lfh__title,
.cart-page h1.lfh__title {
	white-space: nowrap;
}

/* ---- Blocks checkout layout ---- */
.checkout-page .wp-block-woocommerce-checkout,
.checkout-page .wc-block-checkout {
	margin: 0 auto;
	padding: 0 0 2.5rem;
	font-family: var(--font-body, "Montserrat", system-ui, sans-serif);
	font-size: 16px;
	color: var(--idx-chk-navy);
	background: transparent;
}
.checkout-page .wc-block-checkout__main,
.checkout-page .wc-block-checkout__sidebar {
	box-sizing: border-box;
}

/* Cards: white on mist */
.checkout-page .wp-block-woocommerce-checkout-fields-block > [data-block-name],
.checkout-page .wc-block-components-express-payment,
.checkout-page .wp-block-woocommerce-checkout-contact-information-block,
.checkout-page .wp-block-woocommerce-checkout-shipping-method-block,
.checkout-page .wp-block-woocommerce-checkout-pickup-options-block,
.checkout-page .wp-block-woocommerce-checkout-shipping-address-block,
.checkout-page .wp-block-woocommerce-checkout-billing-address-block,
.checkout-page .wp-block-woocommerce-checkout-shipping-methods-block,
.checkout-page .wp-block-woocommerce-checkout-payment-block,
.checkout-page .wp-block-woocommerce-checkout-additional-information-block,
.checkout-page .wp-block-woocommerce-checkout-order-note-block,
.checkout-page .wp-block-woocommerce-checkout-terms-block,
.checkout-page .wp-block-woocommerce-checkout-actions-block,
.checkout-page .wp-block-woocommerce-checkout-order-summary-block,
.checkout-page .wc-block-components-sidebar {
	background: #fff;
	border: 1px solid rgba(15, 20, 58, 0.1);
	border-radius: 12px;
	box-shadow: 0 10px 28px rgba(15, 20, 58, 0.06);
	padding: 1.25rem 1.35rem 1.4rem;
	margin: 0 0 1rem;
}

/* Nested blocks inside fields: avoid double cards */
.checkout-page .wp-block-woocommerce-checkout-fields-block > [data-block-name] [data-block-name] {
	background: transparent;
	border: 0;
	box-shadow: none;
	border-radius: 0;
	padding: 0;
	margin: 0 0 1rem;
}
.checkout-page .wp-block-woocommerce-checkout-fields-block > [data-block-name] [data-block-name]:last-child {
	margin-bottom: 0;
}

/* Order summary as navy-headed card */
.checkout-page .wp-block-woocommerce-checkout-order-summary-block,
.checkout-page .wc-block-components-order-summary,
.checkout-page .wp-block-woocommerce-checkout-totals-block {
	padding: 0;
	overflow: hidden;
}
.checkout-page .wp-block-woocommerce-checkout-order-summary-block > .wc-block-components-checkout-order-summary__title,
.checkout-page .wc-block-components-checkout-order-summary__title,
.checkout-page .wc-block-components-panel__button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0;
	padding: 0.95rem 1.25rem;
	background: var(--idx-chk-navy) !important;
	color: #fff !important;
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 600 !important;
	font-size: 1.05rem !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border: 0 !important;
	border-radius: 0 !important;
}
.checkout-page .wc-block-components-panel__button[aria-expanded] {
	background: var(--idx-chk-navy) !important;
}
.checkout-page .wc-block-components-order-summary,
.checkout-page .wc-block-components-totals-wrapper,
.checkout-page .wp-block-woocommerce-checkout-order-summary-cart-items-block,
.checkout-page .wp-block-woocommerce-checkout-order-summary-coupon-form-block,
.checkout-page .wp-block-woocommerce-checkout-order-summary-totals-block {
	padding: 1rem 1.25rem 1.25rem;
}

/* Step / section titles */
.checkout-page .wc-block-components-checkout-step__heading,
.checkout-page .wc-block-components-checkout-step__title,
.checkout-page .wc-block-components-title,
.checkout-page .wp-block-woocommerce-checkout-fields-block h2,
.checkout-page .wp-block-woocommerce-checkout-fields-block h3 {
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 600 !important;
	font-size: 1.25rem !important;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--idx-chk-navy) !important;
	margin: 0 0 0.75rem;
}
.checkout-page .wc-block-components-checkout-step__description,
.checkout-page .wc-block-components-checkout-step__container p {
	font-family: var(--font-body, "Montserrat", system-ui, sans-serif);
	font-size: 16px;
	line-height: 1.5;
	color: rgba(15, 20, 58, 0.75);
}

/* Numbered step index when Blocks exposes it */
.checkout-page .wc-block-components-checkout-step__heading-content::before,
.checkout-page .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before {
	font-family: var(--font-head, "Oswald", sans-serif);
	font-weight: 700;
	color: var(--idx-chk-yellow);
	background: var(--idx-chk-navy);
}

/* Labels + inputs */
.checkout-page label,
.checkout-page .wc-block-components-text-input label,
.checkout-page .wc-block-components-textarea label,
.checkout-page .wc-blocks-components-select__label {
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 500 !important;
	font-size: 0.95rem !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--idx-chk-navy) !important;
}
.checkout-page input.wc-block-components-text-input__input,
.checkout-page .wc-block-components-text-input input,
.checkout-page .wc-block-components-textarea textarea,
.checkout-page select,
.checkout-page .wc-blocks-components-select__select,
.checkout-page .wc-block-components-combobox input,
.checkout-page .wc-block-components-text-input .wc-block-components-text-input__input,
.cart-page input.input-text,
.cart-page textarea {
	font-family: var(--font-body, "Montserrat", system-ui, sans-serif) !important;
	font-size: 16px !important; /* iOS zoom lock */
	font-weight: 400 !important;
	line-height: 1.4;
	color: var(--idx-chk-navy) !important;
	background: #fff !important;
	border: 1.5px solid rgba(15, 20, 58, 0.22) !important;
	border-radius: 8px !important;
	padding: 0.7rem 0.85rem !important;
	min-height: 48px;
	box-shadow: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.checkout-page textarea,
.checkout-page .wc-block-components-textarea textarea {
	min-height: 96px;
}
.checkout-page input:focus,
.checkout-page input:focus-visible,
.checkout-page select:focus,
.checkout-page select:focus-visible,
.checkout-page textarea:focus,
.checkout-page textarea:focus-visible,
.checkout-page .wc-block-components-text-input.is-active input,
.cart-page input.input-text:focus-visible {
	border-color: var(--idx-chk-navy) !important;
	outline: 3px solid rgba(15, 20, 58, 0.2) !important;
	outline-offset: 1px;
	box-shadow: 0 0 0 1px var(--idx-chk-yellow) !important;
}

/* Order summary line items */
.checkout-page .wc-block-components-order-summary-item,
.checkout-page .wc-block-components-order-summary-item__image img {
	border-radius: 8px;
}
.checkout-page .wc-block-components-order-summary-item__description,
.checkout-page .wc-block-components-product-name,
.checkout-page .wc-block-components-product-metadata {
	font-family: var(--font-body, "Montserrat", system-ui, sans-serif);
	font-size: 16px;
	color: var(--idx-chk-navy);
}
.checkout-page .wc-block-components-product-price,
.checkout-page .wc-block-components-order-summary-item__total-price,
.checkout-page .wc-block-components-totals-item__value,
.checkout-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.checkout-page .wc-block-formatted-money-amount {
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 600 !important;
	color: var(--idx-chk-navy) !important;
}
.checkout-page .wc-block-components-totals-footer-item {
	border-top: 2px solid var(--idx-chk-navy);
	margin-top: 0.75rem;
	padding-top: 0.85rem;
}
.checkout-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.checkout-page .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 1.2rem !important;
	color: var(--idx-chk-navy) !important;
}

/* Promo / coupon (keep 1.8.377 wording via PHP; style the field) */
.checkout-page .wc-block-components-totals-coupon,
.checkout-page .wp-block-woocommerce-checkout-order-summary-coupon-form-block {
	margin-top: 0.5rem;
}
.checkout-page .wc-block-components-totals-coupon__button,
.checkout-page .wc-block-components-button:not(.wc-block-components-checkout-place-order-button):not([class*="express"]) {
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 600 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 0 !important;
}

/* Express payment card — container only; never restyle GPay / wallet iframes */
.checkout-page .wc-block-components-express-payment,
.checkout-page .wp-block-woocommerce-checkout-express-payment-block,
.checkout-page .wc-block-components-express-payment__event-buttons {
	background: #fff;
}
.checkout-page .wc-block-components-express-payment__title-container,
.checkout-page .wc-block-components-express-payment-title {
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--idx-chk-navy) !important;
}
.checkout-page .wc-block-components-express-payment__event-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding: 0.35rem 0 0.15rem;
}
/* Leave Google Pay / Apple Pay / wallet button chrome alone (brand rules). */
.checkout-page .wc-block-components-express-payment .gpay-button,
.checkout-page .wc-block-components-express-payment iframe,
.checkout-page .wc-block-components-express-payment [class*="gpay"],
.checkout-page .wc-block-components-express-payment button[aria-label*="Google"],
.checkout-page .wc-block-components-express-payment button[aria-label*="GPay"] {
	/* no theme color overrides */
	border-radius: 4px;
}

/* Payment methods list (Square card / Cash App) — chrome only */
.checkout-page .wc-block-components-radio-control-accordion-option,
.checkout-page .wc-block-components-radio-control__option {
	border: 1.5px solid rgba(15, 20, 58, 0.14);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	margin-bottom: 0.65rem;
	background: #fff;
}
.checkout-page .wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.checkout-page .wc-block-components-radio-control__option-checked {
	border-color: var(--idx-chk-navy);
	box-shadow: inset 0 0 0 1px var(--idx-chk-yellow);
}

/* ==========================================================================
   Primary CTA: Place Order + Proceed to Checkout
   Yellow #F3C91A / navy text → slide-fill navy / white text.
   One smooth ~0.25s ease; no size/padding/border jump.
   ========================================================================== */
.checkout-page .wc-block-components-checkout-place-order-button,
.checkout-page button.wc-block-components-checkout-place-order-button,
.checkout-page .wc-block-checkout__actions .wc-block-components-button.wc-block-components-checkout-place-order-button,
.checkout-page .wc-block-components-checkout-place-order-button.contained,
.checkout-page .wc-block-components-button.contained.wc-block-components-checkout-place-order-button,
.woocommerce-cart .cart-page .wc-proceed-to-checkout a.checkout-button.button.alt.idxcart-btn--primary,
.cart-page .wc-proceed-to-checkout a.checkout-button.idxcart-btn--primary {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 52px !important;
	padding: 0.85rem 1.25rem !important;
	margin: 0 !important;
	box-sizing: border-box !important;
	border: 2px solid var(--idx-chk-yellow) !important;
	border-radius: 0 !important;
	background-color: var(--idx-chk-yellow) !important;
	background-image: linear-gradient(var(--idx-chk-navy), var(--idx-chk-navy)) !important;
	background-repeat: no-repeat !important;
	background-position: left center !important;
	background-size: 0% 100% !important;
	color: var(--idx-chk-navy) !important;
	font-family: var(--font-head, "Oswald", sans-serif) !important;
	font-weight: 600 !important;
	font-size: 1.05rem !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase !important;
	text-decoration: none !important;
	line-height: 1.2 !important;
	box-shadow: none !important;
	transform: none !important;
	transition:
		background-size 0.25s ease,
		color 0.25s ease,
		border-color 0.25s ease !important;
}
.checkout-page .wc-block-components-checkout-place-order-button:hover,
.checkout-page .wc-block-components-checkout-place-order-button:focus-visible,
.checkout-page button.wc-block-components-checkout-place-order-button:hover,
.checkout-page .wc-block-components-checkout-place-order-button.contained:hover,
.woocommerce-cart .cart-page .wc-proceed-to-checkout a.checkout-button.button.alt.idxcart-btn--primary:hover,
.woocommerce-cart .cart-page .wc-proceed-to-checkout a.checkout-button.button.alt.idxcart-btn--primary:focus-visible,
.cart-page .wc-proceed-to-checkout a.checkout-button.idxcart-btn--primary:hover,
.cart-page .wc-proceed-to-checkout a.checkout-button.idxcart-btn--primary:focus-visible {
	background-color: var(--idx-chk-yellow) !important;
	background-image: linear-gradient(var(--idx-chk-navy), var(--idx-chk-navy)) !important;
	background-size: 100% 100% !important;
	color: #fff !important;
	border-color: var(--idx-chk-navy) !important;
	transform: none !important;
	box-shadow: none !important;
}

/* Kill Woo Blocks gray "contained" button chrome / separate transition on children */
.checkout-page .wc-block-components-checkout-place-order-button .wc-block-components-button__text,
.checkout-page .wc-block-components-checkout-place-order-button span {
	color: inherit !important;
	transition: color 0.25s ease !important;
}
.checkout-page .wc-block-components-checkout-place-order-button::before,
.checkout-page .wc-block-components-checkout-place-order-button::after {
	display: none !important;
	content: none !important;
}

/* Loading / disabled: intentional, no jump */
.checkout-page .wc-block-components-checkout-place-order-button[disabled],
.checkout-page .wc-block-components-checkout-place-order-button[aria-disabled="true"],
.checkout-page .wc-block-components-checkout-place-order-button.wc-block-components-checkout-place-order-button--loading,
.checkout-page .wc-block-components-checkout-place-order-button.is-loading {
	opacity: 0.72 !important;
	cursor: wait !important;
	background-size: 0% 100% !important;
	color: var(--idx-chk-navy) !important;
	transform: none !important;
}
.checkout-page .wc-block-components-checkout-place-order-button .wc-block-components-spinner,
.checkout-page .wc-block-components-checkout-place-order-button .wc-block-components-button__spinner {
	border-color: rgba(15, 20, 58, 0.2) !important;
	border-top-color: var(--idx-chk-navy) !important;
	color: var(--idx-chk-navy) !important;
}

@media (prefers-reduced-motion: reduce) {
	.checkout-page .wc-block-components-checkout-place-order-button,
	.cart-page .wc-proceed-to-checkout a.checkout-button {
		transition: none !important;
	}
}

/* ---- Stray / orphaned loading UI ----
   SSR marks .wc-block-checkout.is-loading until hydrate. After hydrate, hide orphan
   spinners that aren't inside an active processing mask or the Place Order button.
   Do NOT hide .wc-block-components-spinner while checkout is processing. */
.checkout-page .wc-block-checkout:not(.is-loading):not(.is-processing) > .wc-block-components-spinner,
.checkout-page .wc-block-checkout:not(.is-loading):not(.is-processing) .wc-block-components-express-payment__event-buttons > .wc-block-components-spinner:only-child,
.checkout-page .wp-block-woocommerce-checkout-express-payment-block:empty,
.checkout-page .wc-block-components-express-payment:not(.is-active) .wc-block-components-spinner:not(.wc-block-components-button__spinner),
.checkout-page .wc-block-checkout.is-loading::before {
	/* decoy: some builds paint a lone pulse dot via ::before on is-loading */
}
.checkout-page .wc-block-checkout.is-loading::after,
.checkout-page .wc-block-checkout > .wc-block-components-spinner:first-child:last-child {
	/* handled below */
}
/* Hide a lone decorative loading dot/skeleton outside real overlays */
.checkout-page .wc-block-checkout.is-loading .wp-block-woocommerce-checkout-express-payment-block:empty::before,
.checkout-page .wc-block-components-express-payment--fallback,
.checkout-page .wc-block-components-skeleton,
.checkout-page .wc-block-components-spinner:not(.wc-block-components-button__spinner):not([aria-hidden="false"]) {
	/* default: leave real ones; see orphan rule */
}
.checkout-page .entry-content > .wc-block-components-spinner,
.checkout-page .wc-block-checkout__main > .wc-block-components-spinner:first-child:not(.is-active),
.checkout-page .prose > .wc-block-components-spinner,
.checkout-page .wc-block-components-loading-mask__spinner {
	/* loading mask spinner stays visible while mask is shown */
}
/* Orphan red/white pulse often sits as an empty absolute spinner over white content */
.checkout-page .wc-block-checkout:not(.is-processing) .wc-block-components-spinner:not(.wc-block-components-button__spinner):not(.wc-block-components-loading-mask__spinner) {
	display: none !important;
}
/* While Blocks still boots, keep a clean mist page instead of a stray red dot */
.checkout-page .wc-block-checkout.is-loading {
	position: relative;
	min-height: 12rem;
}
.checkout-page .wc-block-checkout.is-loading::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 2.5rem;
	width: 28px;
	height: 28px;
	margin: 0 0 0 -14px;
	border-radius: 50%;
	border: 3px solid rgba(15, 20, 58, 0.15);
	border-top-color: var(--idx-chk-navy);
	animation: idx-chk-spin 0.7s linear infinite;
	z-index: 2;
}
@keyframes idx-chk-spin {
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.checkout-page .wc-block-checkout.is-loading::before { animation: none; border-top-color: var(--idx-chk-navy); }
}

/* Cart: align card ground with mist when desired — keep existing white card */
.cart-page > .section--white {
	background: var(--idx-chk-mist);
}
.cart-page .idxcart-card {
	border-radius: 12px;
}

/* Responsive */
@media (max-width: 1024px) {
	.checkout-page .wc-block-checkout,
	.cart-page .idxcart-wrap { padding-inline: 0; }
}
@media (max-width: 768px) {
	.checkout-page .wp-block-woocommerce-checkout-fields-block > [data-block-name],
	.checkout-page .wp-block-woocommerce-checkout-order-summary-block {
		padding-left: 1rem;
		padding-right: 1rem;
	}
	.checkout-page .wp-block-woocommerce-checkout-order-summary-block { padding: 0; }
}
@media (max-width: 390px) {
	.checkout-page .wc-block-components-checkout-place-order-button,
	.cart-page .wc-proceed-to-checkout a.checkout-button {
		font-size: 0.95rem !important;
	}
}

/* 1.8.450 — force white label on navy slide (beat .wp-element-button / type-422) */
.checkout-page .wc-block-components-checkout-place-order-button.wp-element-button:hover,
.checkout-page .wc-block-components-checkout-place-order-button.wp-element-button:focus-visible,
.checkout-page .wc-block-components-checkout-place-order-button.contained:hover,
.checkout-page .wc-block-components-checkout-place-order-button.contained:focus-visible,
.checkout-page button.wc-block-components-checkout-place-order-button:hover,
.checkout-page button.wc-block-components-checkout-place-order-button:focus-visible,
.woocommerce-cart .cart-page .wc-proceed-to-checkout a.checkout-button.button.alt.idxcart-btn--primary:hover,
.woocommerce-cart .cart-page .wc-proceed-to-checkout a.checkout-button.button.alt.idxcart-btn--primary:focus-visible {
	color: #ffffff !important;
}
.checkout-page .wc-block-components-checkout-place-order-button:hover .wc-block-components-button__text,
.checkout-page .wc-block-components-checkout-place-order-button:focus-visible .wc-block-components-button__text,
.checkout-page .wc-block-components-checkout-place-order-button:hover .wc-block-components-checkout-place-order-button__text,
.checkout-page .wc-block-components-checkout-place-order-button:hover span {
	color: #ffffff !important;
}

/* Hide site laser-cursor red dot on checkout/cart so it isn't mistaken for a spinner */
body.woocommerce-checkout .laser-cursor,
body.woocommerce-cart .laser-cursor {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}
body.woocommerce-checkout.laser-cursor-on,
body.woocommerce-checkout.laser-cursor-on *,
body.woocommerce-cart.laser-cursor-on,
body.woocommerce-cart.laser-cursor-on * {
	cursor: auto !important;
}

/* 1.8.450 — Place Order uses buttons-423 slide, but white label on navy fill (Tone). */
.checkout-page .wc-block-components-checkout-place-order-button.wp-element-button,
.checkout-page button.wc-block-components-checkout-place-order-button {
	--b423-bg: #f3c91a;
	--b423-fill: #0f143a;
	--b423-text: #ffffff;
	transition: background-size 0.25s ease, color 0.25s ease, border-color 0.25s ease !important;
	transform: none !important;
}
.checkout-page .wc-block-components-checkout-place-order-button.wp-element-button:is(:hover, :focus-visible),
.checkout-page button.wc-block-components-checkout-place-order-button:is(:hover, :focus-visible) {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	transform: none !important;
	box-shadow: none !important;
}
.checkout-page .wc-block-components-checkout-place-order-button:is(:hover, :focus-visible) :is(span, div, strong) {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

/* 1.8.450 — hide empty shipping/pickup cards (e.g. virtual/donation carts) */
.checkout-page .wp-block-woocommerce-checkout-shipping-method-block:not(:has(.wc-block-components-radio-control)):not(:has(input)):not(:has(select)),
.checkout-page .wp-block-woocommerce-checkout-pickup-options-block:not(:has(.wc-block-components-radio-control)):not(:has(input)),
.checkout-page .wp-block-woocommerce-checkout-shipping-methods-block:not(:has(.wc-block-components-radio-control)):not(:has(input)),
.checkout-page .wp-block-woocommerce-checkout-shipping-address-block:not(:has(input)):not(:has(select)),
.checkout-page .wp-block-woocommerce-checkout-express-payment-block:not(:has(iframe)):not(:has(button)):not(:has(.wc-block-components-express-payment)) {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	box-shadow: none !important;
}
