.wc-block-components-product-rating {
	display: block;
	margin-top: 0;
	margin-bottom: $gap-small;

	&__stars {
		overflow: hidden;
		position: relative;
		width: 5.3em;
		height: 1.618em;
		line-height: 1.618;
		font-size: 1em;
		/* stylelint-disable-next-line font-family-no-missing-generic-family-keyword */
		font-family: star;
		font-weight: 400;
		margin: 0 auto;
		text-align: left;

		&::before {
			content: "\53\53\53\53\53";
			top: 0;
			left: 0;
			right: 0;
			position: absolute;
			opacity: 0.5;
			color: inherit;
			white-space: nowrap;
		}
		span {
			overflow: hidden;
			top: 0;
			left: 0;
			right: 0;
			position: absolute;
			color: inherit;
			padding-top: 1.5em;
		}
		span::before {
			content: "\53\53\53\53\53";
			top: 0;
			left: 0;
			right: 0;
			position: absolute;
			color: inherit;
			white-space: nowrap;
		}
	}

	&__link {
		display: inline-block;
		width: 100%;
		text-align: inherit;
		@include font-size(small);
	}
}

.wc-block-single-product {
	.wc-block-components-product-rating__stars {
		margin: 0;
	}
}

.wc-block-all-products,
.wp-block-query {
	.is-loading {
		.wc-block-components-product-rating {
			@include placeholder();
			width: 7em;
			margin-left: auto;
			margin-right: auto;
		}
	}
}

// Fix applied specifically to Classic Template
.woocommerce-loop-product__link {
	.wc-block-components-product-rating__stars {
		display: block;
	}
}
