/*
 * FixReef brand colour for front-end buttons, whatever the theme: block buttons, WooCommerce buttons
 * (shop, cart, checkout, My account) and the repair forms. Change --frr-brand here to rebrand.
 * Icon-only, outline and text-link buttons keep their own colours. All buttons get slightly rounded corners.
 */
:root {
	--frr-brand: #01696e; /* Teal from the FixReef logo. */
	--frr-brand-dark: #014f53;
	--frr-brand-text: #fff;
	--frr-button-radius: 8px;
}

body :is(.wp-element-button, .wp-block-button__link, .woocommerce .button, .woocommerce-page .button, .wc-block-components-button):not(.wc-block-components-drawer__close, .is-link, .wc-block-components-button--text, .button-link) {
	border-radius: var(--frr-button-radius);
}

body :is(.wp-element-button, .wp-block-button__link, .woocommerce .button, .woocommerce-page .button, .wc-block-components-button):not(.is-style-outline .wp-block-button__link, .wc-block-components-drawer__close, .outlined, .is-link, .wc-block-components-button--text, .button-link, .frr-button-secondary) {
	border-color: var(--frr-brand);
	background-color: var(--frr-brand);
	color: var(--frr-brand-text);
}

body :is(.wp-element-button, .wp-block-button__link, .woocommerce .button, .woocommerce-page .button, .wc-block-components-button):not(.is-style-outline .wp-block-button__link, .wc-block-components-drawer__close, .outlined, .is-link, .wc-block-components-button--text, .button-link, .frr-button-secondary):is(:hover, :focus-visible):not(:disabled, .disabled) {
	border-color: var(--frr-brand-dark);
	background-color: var(--frr-brand-dark);
	color: var(--frr-brand-text);
}

/* Outline-style block buttons: teal outline and text instead of a fill. */
body .is-style-outline .wp-block-button__link {
	border-color: var(--frr-brand);
	color: var(--frr-brand);
}

body .is-style-outline .wp-block-button__link:is(:hover, :focus-visible) {
	border-color: var(--frr-brand-dark);
	background-color: var(--frr-brand);
	color: var(--frr-brand-text);
}

/* Parts store (main site look): condition badges and the notes under Add to cart. The filter menu is in store.css. */
.frr-condition {
	display: inline-block;
	margin: 0.25em 0;
	padding: 0.1em 0.6em;
	border-radius: 999px;
	font-size: 0.8em;
	font-weight: 600;
	line-height: 1.6;
	background: #eef2f2;
	color: #4d6162;
}

/* Block themes centre the product cards' text; the badge follows. */
.wc-block-product .frr-condition {
	display: block;
	width: fit-content;
	margin: 0.25em auto;
	font-size: 0.8rem;
}

.frr-condition--new {
	background: #e0f0f0;
	color: var(--frr-brand-dark);
}

.frr-condition--repaired {
	background: #fdf1dc;
	color: #7a4b00;
}

.frr-store-notes {
	margin: 1em 0 0.5em;
	padding-left: 1.2em;
	font-size: 0.95em;
}

.frr-store-policy-link {
	font-size: 0.9em;
}
