/**
 * Replace all WooCommerce icon font (WooCommerce) with Font Awesome Pro v7 / v6 / 5.
 * Kit sets --fa-font-solid as shorthand (normal 900 1em/1 var(--fa-family-classic));
 * we need the family name only for font-family, so use --fa-family-classic.
 */
:root {
	--tbs-wc-fa-font: var(--fa-family-classic, "Font Awesome 6 Pro", "Font Awesome 5 Free");
	--tbs-wc-fa-weight: 900;
}

/* Notices: info (default), success, error */
.woocommerce .woocommerce-error::before,
.woocommerce .woocommerce-info::before,
.woocommerce .woocommerce-message::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	line-height: 1;
	text-rendering: auto;
}

.woocommerce .woocommerce-message::before {
	content: "\f058" !important; /* circle-check (success) */
	color: #46b450;
}

.woocommerce .woocommerce-info::before {
	content: "\f05a" !important; /* circle-info */
	color: #1e85be;
}

.woocommerce .woocommerce-error::before {
	content: "\f057" !important; /* circle-xmark (error) */
	color: #b81c23;
}

/* Digital downloads list */
.woocommerce-account ul.digital-downloads li::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f019" !important; /* download */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Customer details: phone & email (order details, address) */
.woocommerce .woocommerce-customer-details .woocommerce-customer-details--phone::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f095" !important; /* phone */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

.woocommerce .woocommerce-customer-details .woocommerce-customer-details--email::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f0e0" !important; /* envelope */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Layered nav / filter chosen & remove */
.woocommerce .woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item--chosen a::before,
.woocommerce .widget_layered_nav_filters ul li a::before,
.woocommerce .widget_rating_filter ul li.chosen a::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f00d" !important; /* xmark */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Button loading spinner — CSS ring (Font Awesome spinner glyph renders poorly on buttons) */
.woocommerce .button.loading::after,
.woocommerce #respond input#submit.loading::after,
.woocommerce a.button.loading::after,
.woocommerce button.button.loading::after,
.woocommerce input.button.loading::after {
	content: "" !important;
	font-family: inherit !important;
	font-weight: 400 !important;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.1em;
	height: 1.1em;
	margin: -0.55em 0 0 -0.55em;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.65s linear infinite;
	line-height: 1;
	vertical-align: middle;
}

.tbs-product-cart-panel .single_add_to_cart_button.loading,
.tbs-product-cart-panel .ajax_add_to_cart.loading {
	color: transparent !important;
	position: relative;
}

/* Button added check */
.woocommerce .button.added::after,
.woocommerce #respond input#submit.added::after,
.woocommerce a.button.added::after,
.woocommerce button.button.added::after,
.woocommerce input.button.added::after {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f00c" !important; /* check */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Shipping calculator button */
.woocommerce .cart-collaterals .shipping-calculator-button::after,
.woocommerce-cart .cart-collaterals .shipping-calculator-button::after,
.woocommerce-checkout .cart-collaterals .shipping-calculator-button::after {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f0d1" !important; /* truck */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

/* Star rating (product reviews): replace WooCommerce star font with FA solid star */
.woocommerce .star-rating::before,
.woocommerce .star-rating span::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

.woocommerce .star-rating::before {
	content: "\f005\f005\f005\f005\f005" !important; /* 5 empty stars – use same char, color dimmed by WC */
}

.woocommerce .star-rating span::before {
	content: "\f005\f005\f005\f005\f005" !important; /* 5 full stars */
}

/* Product star rating (p.stars) – empty vs full */
.woocommerce p.stars a::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f005" !important; /* star (empty state) */
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

.woocommerce p.stars:hover a::before,
.woocommerce p.stars.selected a.active::before,
.woocommerce p.stars.selected a.active ~ a::before {
	font-family: var(--tbs-wc-fa-font) !important;
	font-weight: var(--tbs-wc-fa-weight) !important;
	content: "\f005" !important; /* star (full) */
}

.woocommerce p.stars a:hover ~ a::before {
	content: "\f005" !important;
}
