/* Basic layout */
.ar-rating {
	display: inline-flex;
	align-items: center;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
	gap: 0.5rem;
	color: #222;
}

.ar-inner {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.ar-stars {
	position: relative;
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}

/* Radio inputs visually hidden but accessible */
.ar-radio {
	position: absolute !important;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.ar-star {
	font-size: 1.2rem;
	line-height: 1;
	color: #ccc;
	cursor: pointer;
	padding: 0 0.05rem;
	transition: transform 120ms ease;
}
.ar-star:focus,
.ar-star:hover {
	outline: none;
}

.ar-stars .ar-star:hover {
	transform: scale(1.08);
}

/* Visual star layers for average + hover/active fill */
.ar-visual {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
}

.ar-bg,
.ar-fill > span {
	letter-spacing: 0.08rem;
	font-size: 1.2rem;
	line-height: 1;
}

.ar-bg {
	color: #e0e0e0;
	text-shadow: 0 0 1px rgba(0,0,0,0.05);
}

.ar-fill {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	white-space: nowrap;
	overflow: hidden;
	color: #f5b400; /* Gold */
	text-shadow: 0 0 1px rgba(0,0,0,0.1);
	transition: width 160ms ease;
}

/* Spacing ensures the overlay covers the 5 labels width */
.ar-stars {
	padding: 0.2rem 0.1rem;
}
.ar-stars .ar-star {
	visibility: hidden; /* visual stars drawn by overlay; labels provide click targets */
	width: 1.1rem;
}

/* Meta text (average and count) */
.ar-meta {
	font-size: 0.95rem;
	color: #444;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.ar-sep {
	opacity: 0.6;
}

.ar-status {
	margin-left: 0.5rem;
	font-size: 0.9rem;
	color: #1f6f43;
	min-height: 1.2em;
}

/* Disabled state */
.ar-disabled .ar-star,
.ar-disabled .ar-stars {
	cursor: not-allowed;
}
.ar-disabled .ar-status {
	color: #b45309;
}

/* Hovering class to optionally style */
.ar-hovering .ar-fill {
	filter: saturate(1.05);
}

/* Editor preview tweaks */
.block-editor-page .ar-rating .ar-status {
	display: none;
}

/* Responsive */
@media (max-width: 480px) {
	.ar-meta {
		font-size: 0.9rem;
	}
	.ar-star,
	.ar-bg,
	.ar-fill > span {
		font-size: 1.1rem;
	}
}