.powermail_fieldwrap_type_rating {
	--pmr-size: 2rem;
	--pmr-target: 2.75rem;
	--pmr-gap: 0.25rem;
	--pmr-color: #6c757d;
	--pmr-color-active: #f5b301;
	--pmr-color-active-stroke: #a87400;
	--pmr-color-hover: #ffd34d;
	--pmr-color-error: #dc3545;
	--pmr-color-focus: #005fcc;
	--pmr-legend-size: 0.775rem;
}

.pmr__title {
	display: block;
}

.pmr__control {
	display: inline-flex;
	flex-direction: column;
	max-width: 100%;
}

.pmr__items {
	display: flex;
	flex-wrap: wrap;
	gap: var(--pmr-gap);
}

.pmr__item {
	position: relative;
	display: flex;
}

.pmr__input,
.pmr__sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0;
}

.pmr__label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--pmr-target);
	height: var(--pmr-target);
	margin: 0;
	border-radius: 0.25rem;
	cursor: pointer;
}

.pmr__star {
	width: var(--pmr-size);
	height: var(--pmr-size);
	fill: transparent;
	stroke: var(--pmr-color);
	stroke-width: 1.5;
	stroke-linejoin: round;
	transition: fill 0.15s ease, stroke 0.15s ease, transform 0.15s ease;
}

.pmr__item:has(> .pmr__input:checked) .pmr__star,
.pmr__item:has(~ .pmr__item > .pmr__input:checked) .pmr__star {
	fill: var(--pmr-color-active);
	stroke: var(--pmr-color-active-stroke);
}

@media (hover: hover) {
	.pmr__items:hover .pmr__item .pmr__star {
		fill: var(--pmr-color-hover);
		stroke: var(--pmr-color-active-stroke);
	}

	.pmr__items:hover .pmr__item:hover ~ .pmr__item .pmr__star {
		fill: transparent;
		stroke: var(--pmr-color);
	}

	.pmr__items:hover .pmr__item:hover .pmr__star {
		transform: scale(1.1);
	}
}

.pmr__input:focus-visible + .pmr__label {
	outline: 0.1875rem solid var(--pmr-color-focus);
	outline-offset: 0.125rem;
}

.pmr__items.powermail_field_error .pmr__star {
	stroke: var(--pmr-color-error);
}

.pmr__legend {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.25rem;
	font-size: var(--pmr-legend-size);
	line-height: 1.3;
}

.pmr__legend-max {
	text-align: right;
}

@media (max-width: 991.98px) {
	.powermail_fieldwrap_type_rating {
		--pmr-size: 1.75rem;
		--pmr-gap: 0;
		--pmr-legend-size: 0.8125rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pmr__star {
		transition: none;
	}

	.pmr__items:hover .pmr__item:hover .pmr__star {
		transform: none;
	}
}

@media (forced-colors: active) {
	.pmr__star {
		stroke: CanvasText;
	}

	.pmr__item:has(> .pmr__input:checked) .pmr__star,
	.pmr__item:has(~ .pmr__item > .pmr__input:checked) .pmr__star {
		fill: Highlight;
		stroke: Highlight;
	}
}
