.wc-block-components-product-rating-stars {
	display: block;
	line-height: 1;

	&__stars {
		display: inline-block;
		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;
		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;
		height: 1.618em;
		width: 100%;
		text-align: inherit;
		@include font-size(small);
	}

	.wc-block-all-products & {
		margin-top: 0;
		margin-bottom: $gap-small;
	}

	&__norating-container {
		display: inline-flex;
		flex-direction: row;
		align-items: center;
		gap: $gap-smaller;
	}

	&__norating {
		display: inline-block;
		overflow: hidden;
		position: relative;
		width: 1.5em;
		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;
		-webkit-text-stroke: 2px var(--wp--preset--color--black, #000);
		&::before {
			content: "\53";
			top: 0;
			left: 0;
			right: 0;
			position: absolute;
			color: transparent;
			white-space: nowrap;
			text-align: center;
		}
	}
}

.wp-block-woocommerce-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;
		}
	}
}
