/* ── EPOFW Rating Field ────────────────────────────────────────────────── */

.epofw-rating-wrap {
	display: inline-flex;
	flex-direction: row-reverse; /* DOM order is 5→1; CSS reverses to show 1→5 */
	gap: 2px;
	align-items: center;
}

/* Hide the actual radio inputs visually */
.epofw-rating-wrap .epofw-star-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Default star colour */
.epofw-rating-wrap .epofw-star-label {
	cursor: pointer;
	color: #ccc;
	font-size: 0; /* prevent gap from inline elements */
	line-height: 1;
	transition: color .12s ease;
}

.epofw-rating-wrap .epofw-star-label .dashicons {
	font-size: 30px;
	width: 30px;
	height: 30px;
	line-height: 1;
}

/* Checked state: colour the selected star and all stars after it in DOM
   (which are lower-numbered stars displayed to the left) */
.epofw-rating-wrap .epofw-star-input:checked ~ .epofw-star-label {
	color: #f5a623;
}

/* Hover: highlight hovered star and all stars to the right of it (lower-numbered)
   using the general sibling combinator on the reversed flex container */
.epofw-rating-wrap .epofw-star-label:hover,
.epofw-rating-wrap .epofw-star-label:hover ~ .epofw-star-label {
	color: #f5a623;
}

/* When hovering the whole wrap, temporarily reset so only hovered segment lights */
.epofw-rating-wrap:hover .epofw-star-input:checked ~ .epofw-star-label {
	color: #ccc;
}
.epofw-rating-wrap:hover .epofw-star-label:hover,
.epofw-rating-wrap:hover .epofw-star-label:hover ~ .epofw-star-label {
	color: #f5a623;
}

/* Focus ring for keyboard accessibility */
.epofw-rating-wrap .epofw-star-input:focus-visible + .epofw-star-label {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
	border-radius: 2px;
}

/* ── Responsive Design ────────────────────────────────────────────────────── */

/* Tablet screens: reduce star size for better fit */
@media ( max-width: 1024px ) {
	.epofw-rating-wrap .epofw-star-label .dashicons {
		font-size: 26px;
		width: 26px;
		height: 26px;
	}

	.epofw-rating-wrap {
		gap: 1px;
	}
}

/* Mobile screens: smaller stars, tighter spacing */
@media ( max-width: 768px ) {
	.epofw-rating-wrap .epofw-star-label .dashicons {
		font-size: 24px;
		width: 24px;
		height: 24px;
	}

	.epofw-rating-wrap {
		gap: 1px;
	}

	.epofw-rating-wrap .epofw-star-input:focus-visible + .epofw-star-label {
		outline-offset: 1px;
		outline-width: 1px;
	}
}

/* Small mobile screens: very compact */
@media ( max-width: 480px ) {
	.epofw-rating-wrap .epofw-star-label .dashicons {
		font-size: 22px;
		width: 22px;
		height: 22px;
	}

	.epofw-rating-wrap {
		gap: 0;
	}
}
