/* ---------------------------------------------------------------------------
   Cart, checkout and account: the WooCommerce blocks dressed like the storefront.
   Loaded on those pages only. The blocks take the yellow button and the text colours from
   theme.json; this file handles cards, fields, totals and notices.
--------------------------------------------------------------------------- */
.shell { padding-block: 2rem 4rem; }
@media (min-width: 768px) { .shell { padding-block: 3rem 6rem; } }
.shell > .wrap > * + * { margin-top: 2rem; }
.shell__card {
	padding: 2rem;
	border: 1px solid var(--c-border);
	border-radius: var(--cd-radius-md);
	background: #fff;
	box-shadow: var(--cd-shadow-sm);
}
@media (min-width: 768px) { .shell__card { padding: 3rem; } }
.shell__card > * + * { margin-top: 2rem; }
.shell__card .page-title { margin-bottom: 0; }

.cart-quote {
	margin: 0;
	padding-top: 1.5rem;
	border-top: 1px solid var(--c-border);
	font-size: 0.875rem;
	color: var(--c-muted);
}
.cart-quote a { font-weight: 600; color: var(--wp--preset--color--secondary-900); }
.cart-quote a:hover { text-decoration: underline; }

/* Blocks inherit the page font; headings inside them are the sans face like the storefront cards. */
.wc-block-cart,
.wc-block-checkout { font-family: var(--cd-sans); font-size: 1rem; }
.wc-block-components-title.wc-block-components-title,
.wc-block-cart__totals-title,
.wc-block-components-checkout-step__title {
	font-family: var(--cd-serif);
	font-size: 1.125rem;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: #000;
}
.wc-block-components-checkout-step__heading { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--wp--preset--color--gray-200); }

.wc-block-components-product-name { font-weight: 600; color: #000; text-decoration: none; }
.wc-block-components-product-name:hover { color: var(--c-accent-hover); }
.wc-block-components-product-metadata,
.wc-block-components-product-details { font-size: 0.875rem; color: var(--c-muted); }
.wc-block-cart-items { border-color: var(--wp--preset--color--gray-200); }
.wc-block-cart-items__row img { border-radius: var(--cd-radius-sm); background: var(--wp--preset--color--gray-50); object-fit: contain; }

/* Sidebar totals as a card. */
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	align-self: start;
}
.wc-block-components-sidebar .wc-block-components-totals-wrapper,
.wc-block-components-totals-wrapper { border-color: var(--wp--preset--color--gray-200); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 800; }

/* Fields */
.wc-block-components-text-input input[type="text"],
.wc-block-components-text-input input[type="email"],
.wc-block-components-text-input input[type="tel"],
.wc-block-components-text-input input[type="number"],
.wc-block-components-text-input input[type="password"],
.wc-block-components-textarea,
.wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input.components-combobox-control__input {
	border: 1px solid var(--wp--preset--color--gray-300);
	border-radius: var(--cd-radius-sm);
	background: #fff;
	color: #000;
	box-shadow: var(--cd-shadow-sm);
	font-family: var(--cd-sans);
}
.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus,
.wc-blocks-components-select__select:focus {
	border-color: var(--c-accent-hover);
	outline: none;
	box-shadow: 0 0 0 1px var(--c-accent-hover);
}
.wc-block-components-text-input.is-active label { color: var(--c-muted); }
.wc-block-components-text-input.has-error input { border-color: var(--wp--preset--color--red-600); }
.wc-block-components-validation-error { color: var(--wp--preset--color--red-600); }

/* Radio-style pickers (shipping, payment) share one look. */
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	border: 1px solid var(--wp--preset--color--gray-300);
	border-radius: var(--cd-radius-sm);
	background: #fff;
	transition: border-color var(--cd-ease);
}
.wc-block-components-radio-control__option:hover { border-color: var(--c-accent-hover); }
.wc-block-components-radio-control__option-checked,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border-color: var(--c-accent-hover);
	box-shadow: 0 0 0 1px var(--c-accent-hover);
}
/* Frost pads every input 10px 20px; on these that stretched the circle over the label's
   first letter and turned the checkboxes into wide empty boxes. */
.wc-block-components-radio-control__input,
.wc-block-components-checkbox .wc-block-components-checkbox__input {
	padding: 0;
}
.wc-block-components-radio-control__input:checked,
.wc-block-components-checkbox .wc-block-components-checkbox__input:checked {
	border-color: #000;
}
.wc-block-components-radio-control__input:checked::before { background: #000; }

/* Buttons: pill-free, 8px, black text on amber. */
.wc-block-components-button:not(.is-link) {
	border-radius: var(--cd-radius-sm);
	font-family: var(--cd-sans);
	font-weight: 600;
	text-decoration: none;
	transition: background-color var(--cd-ease);
}
.wc-block-components-button:not(.is-link):not(.outlined) {
	background: var(--c-accent);
	color: #000;
}
.wc-block-components-button:not(.is-link):not(.outlined):hover:not(:disabled) {
	background: rgb(255 197 110 / 0.8);
	color: #000;
}
.wc-block-components-button.outlined {
	border: 1px solid #000;
	background: #fff;
	color: #000;
}
.wc-block-components-button.outlined:hover { background: #000; color: #fff; }
.wc-block-components-button:focus-visible { outline: 2px solid var(--wp--preset--color--secondary-600); outline-offset: 2px; }

/* Notices (the delivery-not-available notice with the quote link lives here too). */
.wc-block-components-notice-banner {
	border-radius: var(--cd-radius-sm);
	font-family: var(--cd-sans);
	font-size: 0.875rem;
}
.wc-block-components-notice-banner.is-info { border-color: var(--c-accent-hover); background: var(--wp--preset--color--secondary-50); }
.wc-block-components-notice-banner a { font-weight: 600; text-decoration: underline; }

/* Quantity selector matches the product stepper. */
.wc-block-components-quantity-selector {
	border: 1px solid #787878;
	border-radius: var(--cd-radius-sm);
	background: transparent;
	overflow: hidden;
}
.wc-block-components-quantity-selector::after { display: none; }
.wc-block-components-quantity-selector__input { font-weight: 500; }
.wc-block-components-quantity-selector__button:hover:not(:disabled) { background: var(--c-accent); opacity: 1; }
.wc-block-cart-item__remove-link { color: var(--c-muted); }
.wc-block-cart-item__remove-link:hover { color: var(--wp--preset--color--red-600); }

/* Order received (the checkout endpoint) */
.wc-block-order-confirmation-status,
.wc-block-order-confirmation-summary,
.wc-block-order-confirmation-totals,
.wc-block-order-confirmation-billing-address,
.wc-block-order-confirmation-shipping-address {
	margin-bottom: 1.5rem;
}
.woocommerce-order-received .shell__card .page-title { margin-bottom: 0; }
