/*
 * BlueCap Google Rating Badge
 *
 * Layout:     5.0      64 reviews     (.bc-grating__score | .bc-grating__count)
 *           ★★★★★     on Google      (.bc-grating__stars | .bc-grating__source)
 *
 * Quick edits:
 *   Card colors ........ --bc-grating-bg, --bc-grating-text, --bc-grating-muted
 *   Star colors ........ --bc-grating-star, --bc-grating-star-empty
 *   Overall size ....... font-size on .bc-grating (everything else scales from it)
 *
 * A few rules use !important. That's deliberate: the LMR theme has broad footer
 * selectors (e.g. "footer#content-info .wrap div.logos a:last-child { left:-18px }")
 * that would otherwise push the badge around.
 */

.bc-grating {
	--bc-grating-bg: #ffffff;
	--bc-grating-text: #3c3c3c;
	--bc-grating-muted: #6b6b6b;
	--bc-grating-star: #f5a623;
	--bc-grating-star-empty: #d9d9d9;
	--bc-grating-radius: 8px;

	display: inline-block;
	vertical-align: middle;
	max-width: 100%;
	font-size: 14px;
	line-height: 1.2;
}

.bc-grating .bc-grating__inner {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	box-sizing: border-box;
	max-width: 100%;
	padding: 0.65em 0.9em;
	background: var(--bc-grating-bg);
	color: var(--bc-grating-text);
	border-radius: var(--bc-grating-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	text-decoration: none;

	/* Neutralize theme rules aimed at footer links. */
	position: static !important;
	left: auto !important;
	float: none !important;
	margin: 0 !important;
}

.bc-grating a.bc-grating__inner:hover,
.bc-grating a.bc-grating__inner:focus-visible {
	color: var(--bc-grating-text);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.bc-grating a.bc-grating__inner:focus-visible {
	outline: 2px solid var(--bc-grating-text);
	outline-offset: 2px;
}

/* Left column: big number with the star row underneath */
.bc-grating .bc-grating__rating {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

/* Stars: a gray row with a gold row laid on top, clipped to the rating percentage
   (e.g. 4.8 = 96% gold). One fixed-size SVG per row, so it can't wrap or overflow. */
.bc-grating .bc-grating__stars {
	position: relative;
	display: block;
	width: 60px;
	height: 12px;
	line-height: 0;
}

.bc-grating .bc-grating__stars-empty,
.bc-grating .bc-grating__stars-full {
	position: absolute;
	top: 0;
	left: 0;
	height: 12px;
	overflow: hidden;
	white-space: nowrap;
}

.bc-grating .bc-grating__stars-empty {
	width: 100%;
	color: var(--bc-grating-star-empty);
}

.bc-grating .bc-grating__stars-full {
	color: var(--bc-grating-star);
}

.bc-grating .bc-grating__stars-svg {
	display: block;
	width: 60px;
	height: 12px;
	max-width: none;
	fill: currentColor;
}

/* Big rating number, e.g. "5.0" */
.bc-grating .bc-grating__score {
	font-size: 2em;
	font-weight: 700;
	line-height: 1;
}

.bc-grating .bc-grating__details {
	display: flex;
	flex-direction: column;
	gap: 0.15em;
	min-width: 0;
}

/* "64 reviews" — bold and large */
.bc-grating .bc-grating__count {
	font-size: 1.15em;
	font-weight: 700;
	white-space: nowrap;
}

/* "on Google" — smaller and lighter */
.bc-grating .bc-grating__source {
	font-size: 0.8em;
	color: var(--bc-grating-muted);
	white-space: nowrap;
}
