.wc-block-rating-filter {
	&.is-loading {
		@include placeholder();
		margin-top: $gap;
		box-shadow: none;
		border-radius: 0;
	}
}

.wp-block-woocommerce-rating-filter {
	margin-bottom: $gap-large;

	.wc-block-components-product-rating {
		&.is-active {
			font-weight: 700;
			.wc-block-components-product-rating__stars span::before {
				color: var(--wp--preset--color--primary, #7f54b3);
			}
		}
	}

	.wc-block-rating-filter .wc-block-rating-filter-list li input,
	.wc-block-rating-filter .wc-block-rating-filter-list li label {
		cursor: pointer;
	}
}

.wc-block-rating-filter__actions {
	align-items: center;
	display: flex;
	gap: $gap;
	justify-content: flex-end;
	margin-top: $gap;

	.wc-block-components-filter-submit-button {
		margin-left: 0;

		&:disabled {
			opacity: 0.6;
			cursor: auto;
		}
	}

	// The specificity here is needed to overwrite the margin-top that is inherited on WC block template pages such as Shop.
	button[type="submit"]:not(.wp-block-search__button).wc-block-components-filter-submit-button {
		margin-left: 0;
		margin-top: 0;
	}

	.wc-block-rating-filter__button {
		margin-top: em($gap-smaller);
		padding: em($gap-smaller) em($gap);
		@include font-size(small);
	}
}

.editor-styles-wrapper .wc-block-rating-filter .wc-block-rating-filter__button {
	margin-top: em($gap-smaller);
	padding: em($gap-smaller) em($gap);
	@include font-size(small);
}
