/*
 * Vibe Streaming — ratings. Themes restyle through custom properties:
 * --spos-star (filled), --spos-star-off (empty), --spos-star-size.
 */
.spos-stars {
	--spos-star: #f5b301;
	--spos-star-off: rgb(127 127 127 / 0.35);
	display: inline-block;
	position: relative;
	font-size: var(--spos-star-size, 1rem);
	line-height: 1;
	letter-spacing: 0.08em;
	vertical-align: -0.1em;
}
.spos-stars::before {
	content: "★★★★★";
	background: linear-gradient(90deg, var(--spos-star) var(--spos-v, 0%), var(--spos-star-off) var(--spos-v, 0%));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.spos-stars--lg {
	--spos-star-size: 1.35rem;
}
.spos-rating {
	margin: 2em 0;
}
.spos-rating__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 12px;
}
.spos-rating__title {
	margin: 0;
}
.spos-rating__overall {
	margin: 0;
}
.spos-rating__overall strong {
	font-size: 1.25em;
}
.spos-rating__count,
.spos-rating__none,
.spos-rating__of {
	opacity: 0.7;
}
.spos-rating__list {
	display: grid;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.spos-rating__row {
	display: grid;
	grid-template-columns: minmax(7em, 1fr) minmax(7em, auto) auto;
	gap: 6px 16px;
	align-items: center;
	padding: 6px 0;
	border-bottom: 1px solid rgb(127 127 127 / 0.2);
}
.spos-rating--single .spos-rating__row {
	border-bottom: 0;
}
.spos-rating__avg {
	white-space: nowrap;
	opacity: 0.85;
}
.spos-rating__input {
	margin: 0;
	padding: 0;
	border: 0;
}
.spos-rating__stars {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
}
.spos-rating__stars input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
}
.spos-rating__stars label {
	padding: 2px;
	color: var(--spos-star-off, rgb(127 127 127 / 0.45));
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.12s, transform 0.12s;
}
.spos-rating__stars label:hover,
.spos-rating__stars label:hover ~ label,
.spos-rating__stars input:checked ~ label {
	color: var(--spos-star, #f5b301);
}
.spos-rating__stars label:hover {
	transform: scale(1.12);
}
.spos-rating__stars input:focus-visible + label {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 4px;
}
.spos-rating.is-own .spos-rating__input,
.spos-rating.is-busy .spos-rating__input {
	opacity: 0.45;
	pointer-events: none;
}
.spos-rating__mine,
.spos-rating__own,
.spos-rating__editor {
	margin: 10px 0 0;
	font-size: 0.9em;
	opacity: 0.85;
}
.spos-rating__clear {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.spos-rating-badge {
	white-space: nowrap;
}
.spos-rating-badge span {
	color: var(--spos-star, #f5b301);
}
@media (max-width: 560px) {
	.spos-rating__row {
		grid-template-columns: 1fr auto;
	}
	.spos-rating__input {
		grid-column: 1 / -1;
	}
}
@media (prefers-reduced-motion: reduce) {
	.spos-rating__stars label {
		transition: none;
	}
}
