/* Nova Supply cart, checkout and order confirmation. Tokens only. */

/* ---------- Progress steps ---------- */
.nv-steps { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: var(--wp--preset--spacing--20) !important; }
.nv-steps__item {
	margin: 0 !important;
	padding-top: var(--wp--preset--spacing--20);
	border-top: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--accent-6);
	font-size: var(--wp--preset--font-size--x-small);
	color: var(--wp--preset--color--accent-4);
}
.nv-steps__item.is-done { border-top-color: var(--wp--preset--color--link); }
.nv-steps__item.is-current {
	border-top-color: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast);
	font-weight: var(--wp--custom--font-weight--semibold);
}
.nv-steps__item a { color: inherit; }
.nv-steps__num { font-family: var(--wp--preset--font-family--mono); margin-inline-end: var(--wp--preset--spacing--20); }

/* ---------- Minimal checkout header ---------- */
.nv-checkout-header .nv-header__bar { min-height: var(--wp--custom--layout--header-height); }
.nv-secure { display: inline-flex; align-items: center; gap: var(--wp--preset--spacing--20); margin: 0; color: var(--wp--preset--color--accent-4); }
.nv-secure::before {
	content: "";
	width: var(--wp--custom--icon--size-sm);
	height: var(--wp--custom--icon--size-sm);
	background: currentColor;
	mask: url("../icons/lock.svg") center / contain no-repeat;
}

/* ---------- Shared: form fields (block checkout, cart coupon) ---------- */
.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-combobox .components-combobox-control input,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-address-form select {
	min-height: var(--wp--custom--control--height) !important;
	background: var(--wp--preset--color--surface) !important;
	color: var(--wp--preset--color--contrast) !important;
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong) !important;
	border-radius: var(--wp--custom--radius--input) !important;
	font-family: var(--wp--preset--font-family--body) !important;
	font-size: var(--wp--preset--font-size--medium) !important;
	box-shadow: none !important;
}
.wc-block-components-text-input input:hover,
.wc-blocks-components-select .wc-blocks-components-select__select:hover { border-color: var(--wp--preset--color--contrast) !important; }
.wc-block-components-text-input input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus,
.wc-block-components-textarea:focus {
	outline: var(--wp--custom--border--width-strong) solid var(--wp--preset--color--focus) !important;
	outline-offset: 0;
	border-color: var(--wp--preset--color--focus) !important;
}
.wc-block-components-text-input label,
.wc-blocks-components-select .wc-blocks-components-select__label { color: var(--wp--preset--color--accent-4) !important; }
.wc-blocks-components-select .wc-blocks-components-select__container { background: transparent; }
.wc-blocks-components-select .wc-blocks-components-select__expand { fill: var(--wp--preset--color--contrast); }
.wc-block-components-text-input.has-error input,
.wc-block-components-validation-error ~ input { border-color: var(--wp--preset--color--error) !important; border-width: var(--wp--custom--border--width-strong) !important; }
.wc-block-components-validation-error { color: var(--wp--preset--color--error); font-size: var(--wp--preset--font-size--small); }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	width: var(--wp--custom--icon--size-sm);
	height: var(--wp--custom--icon--size-sm);
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong);
	border-radius: var(--wp--custom--radius--sm);
}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked { background: var(--wp--preset--color--accent-1); border-color: var(--wp--preset--color--accent-1); }
.wc-block-components-checkbox .wc-block-components-checkbox__mark { fill: var(--wp--preset--color--on-accent); }

/* Buttons from the blocks */
.wc-block-components-button:not(.is-link) {
	min-height: var(--wp--custom--control--height);
	border-radius: var(--wp--custom--radius--button);
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--small);
	font-weight: var(--wp--custom--font-weight--semibold);
}
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	width: 100%;
	background: var(--wp--preset--color--accent-1) !important;
	color: var(--wp--preset--color--on-accent) !important;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover { background: var(--wp--preset--color--accent-1-strong) !important; }
.wc-block-components-totals-coupon__button {
	background: transparent !important;
	color: var(--wp--preset--color--contrast) !important;
	box-shadow: inset 0 0 0 var(--wp--custom--border--width) var(--wp--preset--color--border-strong);
}

/* Notices: icon + words, status surface */
.wc-block-components-notice-banner {
	border-radius: var(--wp--custom--radius--lg);
	border: 0;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
}
.wc-block-components-notice-banner.is-success { background: var(--wp--preset--color--success-surface); }
.wc-block-components-notice-banner.is-success > svg { fill: var(--wp--preset--color--success); background: transparent; }
.wc-block-components-notice-banner.is-info { background: var(--wp--preset--color--info-surface); }
.wc-block-components-notice-banner.is-info > svg { fill: var(--wp--preset--color--info); background: transparent; }
.wc-block-components-notice-banner.is-warning { background: var(--wp--preset--color--warning-surface); }
.wc-block-components-notice-banner.is-warning > svg { fill: var(--wp--preset--color--warning); background: transparent; }
.wc-block-components-notice-banner.is-error { background: var(--wp--preset--color--error-surface); }
.wc-block-components-notice-banner.is-error > svg { fill: var(--wp--preset--color--error); background: transparent; }
.wc-block-components-notice-banner a { color: var(--wp--preset--color--contrast); }

/* ---------- Cart ---------- */
.wc-block-cart-items { border: 0; }
.wc-block-cart-items__header th, .wc-block-cart-items th {
	padding-bottom: var(--wp--preset--spacing--30) !important;
	border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6) !important;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small) !important;
	font-weight: var(--wp--custom--font-weight--regular);
	letter-spacing: var(--wp--custom--letter-spacing--label);
	color: var(--wp--preset--color--accent-4);
}
.wc-block-cart-items { border-collapse: collapse; }
.wc-block-cart-items__row { border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6); }
.wc-block-cart-items__row td { border: 0 !important; padding-block: var(--wp--preset--spacing--40) !important; }
.wc-block-cart-item__image img {
	aspect-ratio: var(--wp--custom--image--ratio-product);
	object-fit: cover;
	background: var(--wp--preset--color--accent-3);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--image);
}
.wc-block-cart .wc-block-components-product-name,
.wc-block-checkout .wc-block-components-product-name {
	color: var(--wp--preset--color--contrast);
	font-weight: var(--wp--custom--font-weight--semibold);
	text-decoration: none;
}
.wc-block-cart .wc-block-components-product-metadata__description { display: none; }
.wc-block-cart .wc-block-components-product-metadata,
.wc-block-cart .wc-block-components-product-details { color: var(--wp--preset--color--accent-4); font-size: var(--wp--preset--font-size--small); }
.wc-block-cart-item__remove-link {
	color: var(--wp--preset--color--accent-4) !important;
	min-width: var(--wp--custom--control--height-sm);
	min-height: var(--wp--custom--control--height-sm);
}
.wc-block-cart-item__remove-link:hover { color: var(--wp--preset--color--error) !important; }
.wc-block-cart-item__total { font-weight: var(--wp--custom--font-weight--semibold); }
/* Under 700px (WooCommerce's own breakpoint): its stacked row uses fixed columns (80px 132px …), so quantity + remove
   push the table past its container and the line total gets cut (iOS Safari). Use the handoff's
   .nv-line grid instead: photo, a shrinkable info column, total. */
@media (max-width: 699px) {
	.wc-block-cart table.wc-block-cart-items { width: 100%; max-width: 100%; }
	.wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: auto minmax(0, 1fr) auto;
		column-gap: var(--wp--preset--spacing--30);
	}
	.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image { padding-inline-end: 0 !important; }
	.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__product { grid-column: 2; min-width: 0; }
	.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__total { grid-column: 3; }
	.wc-block-cart table.wc-block-cart-items .wc-block-cart-item__quantity { flex-wrap: wrap; row-gap: var(--wp--preset--spacing--20); }
}

/* Quantity (cart, mini cart) */
.wc-block-components-quantity-selector {
	min-height: var(--wp--custom--control--height-sm);
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong) !important;
	border-radius: var(--wp--custom--radius--input) !important;
}
.wc-block-components-quantity-selector::after { border: 0 !important; }
.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { color: var(--wp--preset--color--contrast); background: transparent; font-size: var(--wp--preset--font-size--medium); }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	min-width: var(--wp--custom--control--height-sm);
	color: var(--wp--preset--color--contrast);
	opacity: 1;
}
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover { background: var(--wp--preset--color--accent-5); }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled { color: var(--wp--preset--color--accent-6); background: transparent; }

/* Lit order summary (cart sidebar and checkout aside) */
.wc-block-cart .wc-block-components-sidebar,
.wc-block-checkout .wc-block-components-sidebar {
	position: relative;
	align-self: flex-start;
	height: auto;
	padding: var(--wp--preset--spacing--40) !important;
	background-color: var(--wp--preset--color--surface);
	background-image: var(--wp--custom--glow--soft);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
}
.wc-block-cart .wc-block-components-sidebar::before,
.wc-block-checkout .wc-block-components-sidebar::before {
	content: "";
	position: absolute;
	inset: 0 var(--wp--preset--spacing--40) auto;
	height: var(--wp--custom--border--width);
	background: var(--wp--custom--glow--edge);
}
.wc-block-cart .wc-block-cart__totals-title,
.wc-block-checkout .wc-block-components-checkout-order-summary__title-text {
	font-family: var(--wp--preset--font-family--heading) !important;
	font-size: var(--wp--preset--font-size--x-large) !important;
	font-weight: var(--wp--custom--font-weight--semibold) !important;
	letter-spacing: var(--wp--custom--letter-spacing--x-large);
	text-transform: none !important;
	color: var(--wp--preset--color--contrast);
}
.wc-block-components-totals-wrapper { border-top-color: var(--wp--preset--color--accent-6) !important; }
.wc-block-components-totals-item { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--accent-4); }
.wc-block-components-totals-item__value { color: var(--wp--preset--color--contrast); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--x-large);
	font-weight: var(--wp--custom--font-weight--semibold);
	color: var(--wp--preset--color--contrast);
}
.wc-block-components-totals-discount .wc-block-components-totals-item__value { color: var(--wp--preset--color--success); }
.wc-block-components-panel__button { color: var(--wp--preset--color--contrast); font-size: var(--wp--preset--font-size--small); }
.wc-block-components-totals-coupon__content { padding-top: var(--wp--preset--spacing--20); }
.wc-block-components-chip {
	background: var(--wp--preset--color--success-surface);
	color: var(--wp--preset--color--success);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--success);
	border-radius: var(--wp--custom--radius--badge);
	font-family: var(--wp--preset--font-family--mono);
}
.wc-block-components-express-payment__title-container::before,
.wc-block-components-express-payment__title-container::after,
.wc-block-components-express-payment-continue-rule::before,
.wc-block-components-express-payment-continue-rule::after { border-color: var(--wp--preset--color--accent-6) !important; }
.wc-block-components-express-payment__title,
.wc-block-components-express-payment-continue-rule {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small) !important;
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}
.wc-block-components-express-payment .wc-block-components-express-payment__content { border: 0 !important; padding: 0 !important; }

/* Empty cart: dot-grid empty state, then new products */
.wp-block-woocommerce-empty-cart-block { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--50); }
.wp-block-woocommerce-empty-cart-block > * { margin: 0 !important; }
.nv-empty--cart .nv-empty__icon::before { mask-image: url("../icons/cart.svg"); }
.nv-empty-cart__more { font-size: var(--wp--preset--font-size--x-large); }

/* ---------- Checkout ---------- */
.wc-block-components-checkout-step { padding-bottom: var(--wp--preset--spacing--50); border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6); }
.wc-block-components-checkout-step__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large) !important;
	font-weight: var(--wp--custom--font-weight--semibold) !important;
}
.wc-block-components-checkout-step__description { color: var(--wp--preset--color--accent-4); font-size: var(--wp--preset--font-size--small); }
.wc-block-components-checkout-step__container::after { display: none; }
.wc-block-components-checkout-step::after { display: none; }
.wc-block-components-checkout-step__heading-content a { color: var(--wp--preset--color--link); }

/* Selectable cards: shipping and payment options */
.wc-block-components-radio-control--highlight-checked,
.wc-block-components-radio-control-accordion-option { border-color: transparent; }
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	margin-bottom: var(--wp--preset--spacing--20);
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--card);
	box-shadow: inset 0 0 0 var(--wp--custom--border--width) var(--wp--preset--color--border-strong) !important;
	transition: box-shadow var(--wp--custom--transition--base), background-color var(--wp--custom--transition--base);
}
.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted,
.wc-block-components-radio-control__option-checked {
	background: var(--wp--preset--color--accent-2);
	box-shadow: inset 0 0 0 var(--wp--custom--border--width-strong) var(--wp--preset--color--accent-1), var(--wp--preset--shadow--glow) !important;
}
.wc-block-components-radio-control--highlight-checked::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option::after { display: none !important; }
.wc-block-components-radio-control__input {
	background: var(--wp--preset--color--surface) !important;
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--border-strong) !important;
}
.wc-block-components-radio-control__input:checked { border-color: var(--wp--preset--color--accent-1) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--wp--preset--color--accent-1) !important; }
.wc-block-components-radio-control__description,
.wc-block-components-radio-control__secondary-description { color: var(--wp--preset--color--accent-4); }
.wc-block-checkout__no-payment-methods-notice,
.wc-block-components-checkout-payment-methods .wc-block-components-notice-banner { margin: 0; }
.wc-block-checkout__terms { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--accent-4); }
.wc-block-checkout__terms a { color: var(--wp--preset--color--link); }

/* Checkout order summary lines: photo with quantity bubble */
.wc-block-components-order-summary-item__image img {
	aspect-ratio: var(--wp--custom--image--ratio-product);
	object-fit: cover;
	background: var(--wp--preset--color--accent-3);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--image);
}
.wc-block-components-order-summary-item__quantity {
	background: var(--wp--preset--color--accent-4) !important;
	color: var(--wp--preset--color--surface) !important;
	border: 0 !important;
	box-shadow: none !important;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--font-weight--semibold);
}
.wc-block-components-order-summary-item__description { color: var(--wp--preset--color--contrast); }
.wc-block-components-order-summary-item__description .wc-block-components-product-metadata { color: var(--wp--preset--color--accent-4); font-size: var(--wp--preset--font-size--small); }
.wc-block-components-order-summary-item__description .wc-block-components-product-metadata__description { display: none; }

/* ---------- Order confirmation ---------- */
.nv-thanks {
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--base);
	background-image: var(--wp--custom--glow--soft), var(--wp--custom--motif--dots);
	background-size: auto, var(--wp--custom--motif--dots-size);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
}
.nv-thanks > * { margin: 0 !important; }
.nv-thanks__mark {
	width: calc(var(--wp--custom--control--height) * 0.9);
	height: calc(var(--wp--custom--control--height) * 0.9);
	border-radius: var(--wp--custom--radius--pill);
	background: var(--wp--preset--color--success-surface);
	position: relative;
}
.nv-thanks__mark::before {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: var(--wp--custom--icon--size);
	height: var(--wp--custom--icon--size);
	background: var(--wp--preset--color--success);
	mask: url("../icons/check.svg") center / contain no-repeat;
}
.nv-thanks__status { margin: 0; display: flex; flex-direction: column; gap: var(--wp--preset--spacing--20); }
.nv-thanks__status :is(h1, h2, h3) {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: var(--wp--custom--line-height--xx-large);
	letter-spacing: var(--wp--custom--letter-spacing--xx-large);
	font-weight: var(--wp--custom--font-weight--semibold);
}
.nv-thanks__status p {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: var(--wp--custom--line-height--large);
	color: var(--wp--preset--color--accent-4);
}

/* Facts strip */
.nv-facts .wc-block-order-confirmation-summary-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--preset--spacing--30);
	margin: 0;
	padding: var(--wp--preset--spacing--40);
	list-style: none;
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
}
@media (min-width: 782px) {
	.nv-facts .wc-block-order-confirmation-summary-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.nv-facts .wc-block-order-confirmation-summary-list-item { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--20); margin: 0; border: 0; padding: 0; }
.nv-facts .wc-block-order-confirmation-summary-list-item__key {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--font-weight--regular);
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}
.nv-facts .wc-block-order-confirmation-summary-list-item__value { font-weight: var(--wp--custom--font-weight--semibold); color: var(--wp--preset--color--contrast); }

/* Order table and address cards */
.nv-oc h2 { margin: 0 0 var(--wp--preset--spacing--30); font-size: var(--wp--preset--font-size--x-large); }
.nv-oc table { width: 100%; border-collapse: collapse; font-size: var(--wp--preset--font-size--small); }
.nv-oc :is(th, td) {
	padding: var(--wp--preset--spacing--30) 0 !important;
	border: 0 !important;
	border-bottom: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6) !important;
	text-align: start;
	background: transparent !important;
}
.nv-oc thead th {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: var(--wp--custom--font-weight--regular);
	letter-spacing: var(--wp--custom--letter-spacing--label);
	text-transform: uppercase;
	color: var(--wp--preset--color--accent-4);
}
.nv-oc :is(td, th):last-child { text-align: end; }
.nv-oc tfoot tr:last-child :is(th, td) { font-size: var(--wp--preset--font-size--large); font-weight: var(--wp--custom--font-weight--semibold); color: var(--wp--preset--color--contrast); }
.nv-oc a { color: var(--wp--preset--color--contrast); }
.nv-oc__aside > .wp-block-heading { margin-bottom: var(--wp--preset--spacing--30); }
.nv-address-card {
	margin-bottom: var(--wp--preset--spacing--30);
	padding: var(--wp--preset--spacing--40);
	background: var(--wp--preset--color--surface);
	border: var(--wp--custom--border--width) solid var(--wp--preset--color--accent-6);
	border-radius: var(--wp--custom--radius--card);
}
.nv-address-card h3 { margin: 0 0 var(--wp--preset--spacing--20); font-size: var(--wp--preset--font-size--medium); }
.nv-address-card address { font-style: normal; color: var(--wp--preset--color--accent-4); font-size: var(--wp--preset--font-size--small); line-height: var(--wp--custom--line-height--small); border: 0 !important; padding: 0 !important; }

/* Checkout minimal footer */
.nv-footer--minimal .nv-secure { color: inherit; }
.wc-block-checkout .wc-block-components-sidebar .wp-block-woocommerce-checkout-order-summary-block,
.wc-block-checkout .wc-block-components-sidebar .wc-block-components-checkout-order-summary__content { border: 0; padding: 0; }
.nv-oc table,
.nv-oc .wc-block-order-confirmation-totals__table { border: 0 !important; }
.nv-address-card :is(.wc-block-order-confirmation-billing-address, .wc-block-order-confirmation-shipping-address, address) { border: 0 !important; padding: 0 !important; margin: 0; }
.wc-block-cart .wc-block-components-quantity-selector { display: inline-flex; width: auto; }
.wc-block-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { width: calc(var(--wp--custom--control--height) * 0.9); min-width: 0; }
.nv-facts .wc-block-order-confirmation-summary-list-item__value { overflow-wrap: anywhere; }
