/**
 * SureCart design tokens → Revival.
 *
 * SureCart ships its own design system (font, colours, radius, inputs,
 * buttons) as CSS custom properties. Pointing them at the site's tokens makes
 * the product page, store list, cart slide-out, checkout and order pages
 * read as part of the site.
 *
 * Checkout still renders inside SureCart's Shadow DOM, where page styles
 * can't reach, but custom properties inherit through it, so this is the only
 * way to restyle it. :root:root (and body, where SureCart writes the store's
 * brand colour inline) out-ranks SureCart's own defaults.
 *
 * Loaded on every page: the cart slide-out can open anywhere.
 */

:root:root,
body {
	/* Type */
	--sc-font-sans: var(--text-font-family);
	--sc-font-serif: var(--heading-font-family);
	--sc-input-label-font-weight: 500;
	--sc-font-weight-bold: var(--rv-weight-semibold, 650);

	/* Brand colour: buttons, links, focus, selected options. */
	--sc-color-brand-primary: var(--primary);
	--sc-color-primary-500: var(--primary);
	--sc-color-primary-600: color-mix(in srgb, var(--primary) 85%, var(--black));
	--sc-color-primary-text: var(--white);
	--sc-focus-ring-color-primary: var(--primary-light, var(--primary));

	/* Corners: modest on panels and fields, as on the site's forms. */
	--sc-border-radius-small: var(--radius-m);
	--sc-border-radius-medium: var(--radius-l);
	--sc-border-radius-large: var(--radius-xl);
	--sc-input-border-radius-small: var(--rv-field-radius, var(--radius-l));
	--sc-input-border-radius-medium: var(--rv-field-radius, var(--radius-l));
	--sc-input-border-radius-large: var(--rv-field-radius, var(--radius-l));

	/* Fields */
	--sc-input-border-color: var(--rv-control-border, var(--neutral-light));
	--sc-select-border-color: var(--rv-control-border, var(--neutral-light));
	--sc-input-border-color-hover: var(--neutral);
	--sc-input-border-color-focus: var(--primary);
	--sc-input-label-color: var(--text-color, var(--neutral-dark));
	--sc-input-help-text-color: var(--neutral-semi-dark);
}

/* SureCart's product page, store list and cart slide-out render as normal
   blocks (not Shadow DOM), so their buttons can take the site's button
   shape and weight directly. */
.wp-block-surecart-product-buy-button .wp-block-button__link,
.wp-block-surecart-product-buy-buttons .wp-block-button__link,
.wp-block-surecart-cart-submit .wp-block-button__link,
.sc-button__link:not(.sc-button__link--text) {
	border-radius: var(--radius-circle);
	font-family: var(--text-font-family);
	font-weight: 600;
}
