/* EnduroTurf Google Reviews Badge */

.etgr-badge {
	--etgr-star: #fbbc04;
	--etgr-star-empty: #dadce0;
	--etgr-text: #252525;
	--etgr-muted: #666666;
	--etgr-green: #209e2e;

	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 14px 18px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
	font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--etgr-text);
	text-align: center;
	text-decoration: none !important;
	line-height: 1.25;
	box-sizing: border-box;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

a.etgr-badge:hover,
a.etgr-badge:focus-visible {
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
	color: var(--etgr-text);
}

a.etgr-badge:focus-visible {
	outline: 2px solid var(--etgr-green);
	outline-offset: 2px;
}

.etgr-score {
	font-size: 15px;
	color: var(--etgr-text);
}

.etgr-score strong {
	font-size: 18px;
	font-weight: 700;
}

.etgr-outof {
	color: var(--etgr-muted);
}

/* Stars: grey base with a gold copy clipped to the rating percentage */
.etgr-stars {
	position: relative;
	display: inline-block;
	line-height: 0;
	white-space: nowrap;
}

.etgr-stars-base,
.etgr-stars-fill {
	display: inline-flex;
	gap: 1px;
}

.etgr-stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
}

.etgr-stars svg {
	flex-shrink: 0;
	display: block;
}

.etgr-stars-base svg { fill: var(--etgr-star-empty); }
.etgr-stars-fill svg { fill: var(--etgr-star); }

.etgr-meta {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.etgr-count {
	font-size: 14px;
	font-weight: 600;
	color: var(--etgr-text);
}

.etgr-source {
	font-size: 12px;
	color: var(--etgr-muted);
}

/* Row layout (shortcode layout="row") */
.etgr-layout-row {
	flex-direction: row;
	gap: 10px;
	padding: 8px 14px;
}

.etgr-layout-row > span {
	white-space: nowrap;
	flex-shrink: 0;
}

.etgr-layout-row .etgr-meta {
	flex-direction: row;
	gap: 4px;
	align-items: baseline;
}

/* ---------- Floating ---------- */
.etgr-floating {
	position: fixed;
	z-index: 9990;
	width: 150px;
}

.etgr-floating.etgr-pos-left-middle {
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	border-radius: 0 8px 8px 0;
}

.etgr-floating.etgr-pos-bottom-left {
	left: 16px;
	bottom: 16px;
}

.etgr-floating.etgr-pos-bottom-right {
	right: 16px;
	bottom: 16px;
}

a.etgr-floating.etgr-pos-bottom-left:hover,
a.etgr-floating.etgr-pos-bottom-right:hover {
	transform: translateY(-2px);
}

@media (max-width: 767px) {
	.etgr-floating.etgr-mobile-hide {
		display: none !important;
	}

	/* Compact pill, bottom corner, single line */
	.etgr-floating.etgr-mobile-compact {
		width: auto;
		flex-direction: row;
		gap: 6px;
		padding: 6px 12px;
		border-radius: 999px;
		top: auto;
		bottom: 12px;
		transform: none;
	}

	.etgr-floating.etgr-mobile-compact.etgr-pos-left-middle,
	.etgr-floating.etgr-mobile-compact.etgr-pos-bottom-left {
		left: 12px;
		right: auto;
	}

	.etgr-floating.etgr-mobile-compact.etgr-pos-bottom-right {
		right: 12px;
		left: auto;
	}

	.etgr-floating.etgr-mobile-compact .etgr-outof,
	.etgr-floating.etgr-mobile-compact .etgr-source {
		display: none;
	}

	.etgr-floating.etgr-mobile-compact .etgr-score strong {
		font-size: 15px;
	}

	.etgr-floating.etgr-mobile-compact .etgr-count {
		font-size: 13px;
	}

	.etgr-floating.etgr-mobile-compact .etgr-stars svg {
		width: 14px;
		height: 14px;
	}
}

@media print {
	.etgr-floating { display: none !important; }
}
