/* Bezubaan — stars. Warm, printed, never shiny. */

.bz-stars {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	letter-spacing: 0.04em;
	color: var(--bz-muted, #7c6f60);
}

.bz-stars__row {
	position: relative;
	display: inline-block;
	line-height: 0;
	width: 84px;
	height: 15px;
}

.bz-stars__bg,
.bz-stars__fg {
	position: absolute;
	inset: 0;
	display: flex;
	gap: 2px;
	overflow: hidden;
	white-space: nowrap;
}

.bz-stars__bg { color: rgba(23, 18, 12, 0.16); }
.bz-stars__fg { color: var(--bz-gold, #c08a2e); }

.bz-stars svg {
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
}

.bz-stars__text { white-space: nowrap; }

/* The pressable widget */
.bz-rate {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
}

.bz-rate__label {
	font-family: var(--bz-font-ui, system-ui, sans-serif);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--bz-muted, #7c6f60);
}

.bz-rate__buttons {
	display: inline-flex;
	gap: 2px;
}

.bz-rate__star {
	appearance: none;
	border: 0;
	background: none;
	padding: 2px;
	line-height: 0;
	cursor: pointer;
	color: rgba(23, 18, 12, 0.2);
	transition: color 0.15s ease, transform 0.15s ease;
}

.bz-rate__star svg { width: 24px; height: 24px; }

.bz-rate__star:hover,
.bz-rate__star:focus-visible { transform: translateY(-1px); }

.bz-rate__star.is-on,
.bz-rate__buttons:hover .bz-rate__star { color: var(--bz-gold, #c08a2e); }

/* While hovering, only the stars up to the pointer stay lit. */
.bz-rate__buttons:hover .bz-rate__star { color: rgba(23, 18, 12, 0.2); }
.bz-rate__buttons:hover .bz-rate__star:hover,
.bz-rate__buttons:hover .bz-rate__star:hover ~ .bz-rate__star { color: rgba(23, 18, 12, 0.2); }
.bz-rate__buttons:hover .bz-rate__star,
.bz-rate__buttons .bz-rate__star:hover { color: var(--bz-gold, #c08a2e); }
.bz-rate__buttons:hover .bz-rate__star:has(~ .bz-rate__star:hover) { color: rgba(23, 18, 12, 0.2); }

.bz-rate__result {
	font-size: 12px;
	color: var(--bz-muted, #7c6f60);
}

.bz-rate.is-busy { opacity: 0.6; pointer-events: none; }

.bz-rate__toast {
	font-size: 12px;
	color: var(--bz-crimson, #b3271e);
}

/* On the dark end card */
.bz-endcard__rate .bz-rate__label,
.bz-endcard__rate .bz-rate__result { color: rgba(246, 239, 226, 0.7); }
.bz-endcard__rate .bz-rate__star { color: rgba(246, 239, 226, 0.25); }
.bz-endcard__rate .bz-rate__star.is-on { color: var(--bz-gold, #c08a2e); }

.bz-endcard__rate {
	margin: 18px auto 6px;
	max-width: 420px;
	justify-content: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 14px;
}

.bz-endcard__suggest {
	margin: 4px 0 18px;
	text-align: center;
	font-size: 13px;
}

.bz-endcard__suggest a {
	color: rgba(246, 239, 226, 0.72);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bz-endcard__suggest a:hover { color: #f6efe2; }

/* ---------------------------------------------------------------------------
 * Why the stars are not open yet
 *
 * A rating is an opinion about something you have read, so the widget has two
 * closed states and says plainly which one you are in: an account, and some
 * pages behind you.
 * ------------------------------------------------------------------------- */

.bz-rate__locked {
	margin: 6px 0 10px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--bz-muted, #6b6154);
	max-width: 46ch;
}

.bz-rate__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.bz-rate__small {
	display: block;
	font-size: 12px;
	text-decoration: underline;
	text-underline-offset: 2px;
	color: inherit;
	opacity: 0.8;
	margin-bottom: 10px;
}

.bz-rate__small:hover { opacity: 1; }

/* Half a bar, honestly labelled: how far the reader has to go. */
.bz-rate__bar {
	display: block;
	width: min(320px, 100%);
	height: 5px;
	border-radius: 999px;
	background: rgba(23, 18, 12, 0.12);
	overflow: hidden;
	margin: 2px 0 12px;
}

.bz-rate__bar > span {
	display: block;
	height: 100%;
	background: var(--bz-accent, #b3271e);
	border-radius: 999px;
	transition: width 0.3s ease;
}

/* Locked stars still show the shape of the thing, just not as a button. */
.bz-rate.is-locked .bz-rate__star { cursor: not-allowed; opacity: 0.45; }

.bz-rate.is-busy .bz-rate__star { opacity: 0.5; pointer-events: none; }

/* ---------------------------------------------------------------------------
 * The shape of the votes
 *
 * A mean hides everything interesting: 4.4 from everybody at four stars and
 * 4.4 from half fives and half ones are different comics. Ten rows of nothing
 * per star, and the reader can see which one they are looking at.
 * ------------------------------------------------------------------------- */

.bz-dist {
	margin: 12px 0 0;
	max-width: 320px;
}

.bz-dist__row {
	display: grid;
	grid-template-columns: 34px 1fr 28px;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	color: var(--bz-muted, #6b6154);
	line-height: 1.9;
}

.bz-dist__stars { white-space: nowrap; }

.bz-dist__track {
	display: block;
	height: 6px;
	border-radius: 999px;
	background: rgba(23, 18, 12, 0.1);
	overflow: hidden;
}

.bz-dist__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--bz-gold, #c08a2e);
}

.bz-dist__n { text-align: right; font-variant-numeric: tabular-nums; }

.bz-dist__verified {
	margin: 10px 0 0;
	font-size: 11px;
	line-height: 1.5;
	color: var(--bz-teal, #1e4c58);
}

/* In the reader's dark end card the track has to be visible too. */
.bz-endcard .bz-dist__track { background: rgba(255, 255, 255, 0.16); }
.bz-endcard .bz-dist__row { color: rgba(246, 239, 226, 0.72); }
.bz-endcard .bz-dist__verified { color: rgba(246, 239, 226, 0.8); }
