/**
 * Food26 reader ratings (includes/ratings.php): a comment's stars and the star picker in the comment form.
 * Loaded on rated posts with Remix Icon. Colours read the Food26 Design Scheme with the design's values as fallbacks.
 */
.food26-comment-rating {
	display: flex;
	align-items: center;
	margin: 4px 0 10px;
	font-size: 0.875rem;
	line-height: 1.2;
}

.food26-rating-stars {
	display: inline-flex;
	gap: 1px;
	font-size: 1rem;
	color: var(--inoforest-custom-rating, #b7791f);
}

[dir="rtl"] .food26-rating-stars .ri-star-half-fill {
	scale: -1 1;
}

/* The star picker: radio buttons 1-5 in order; the stars after the chosen one are empty. Four classes, so a comment
   widget's or theme's "form label" rules never resize the stars. */
.food26-rating-field {
	grid-column: 1 / -1;
	margin-bottom: 18px;
}

.food26-rating-field fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.comment-form .food26-rating-field legend {
	margin-bottom: 6px;
	padding: 0;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--inoforest-color-heading, #2b1a12);
}

.food26-rating-input {
	position: relative;
	display: inline-flex;
	gap: 4px;
}

.food26-rating-input input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

.comment-form .food26-rating-field .food26-rating-input .food26-rating-star {
	display: block;
	margin: 0;
	font-size: 2rem;
	font-weight: 400;
	line-height: 1;
	color: var(--inoforest-custom-rating, #b7791f);
	cursor: pointer;
}

.comment-form .food26-rating-field .food26-rating-input:not(:has(input:checked)) .food26-rating-star,
.comment-form .food26-rating-field .food26-rating-input input:checked ~ input + .food26-rating-star {
	color: var(--inoforest-color-border, #ece2d6);
}

.comment-form .food26-rating-field .food26-rating-input:hover > .food26-rating-star:not(:hover ~ .food26-rating-star) {
	color: var(--inoforest-custom-rating, #b7791f);
}

.comment-form .food26-rating-field .food26-rating-input:hover > .food26-rating-star:hover ~ .food26-rating-star {
	color: var(--inoforest-color-border, #ece2d6);
}

.food26-rating-input input:focus-visible + .food26-rating-star {
	outline: 2px solid var(--inoforest-color-primary, #b23a1e);
	outline-offset: 2px;
	border-radius: 4px;
}
