/*
 * Google rating badge (2026-11-23, second pass). Markup from inc/reviews.php.
 * Google brand guidance: no star graphics; "5.0 out of 5 on [Google] as of <month>";
 * the wordmark sits on white with clear space equal to the width of its "G".
 * Colours are fixed (and the badge carries .csct-light) so it reads the same inside dark sections.
 */
.csct-reviews {
	--csct-r-ink: #1f1a17;
	--csct-r-muted: #6b625b;
	display: inline-flex;
	align-items: center;
	color: var(--csct-r-ink);
	text-decoration: none;
	line-height: 1.2;
	-webkit-tap-highlight-color: transparent;
}
.csct-reviews:focus-visible { outline: 2px solid #c8641a; outline-offset: 3px; }

.csct-reviews__score {
	font-family: var(--wp--preset--font-family--archivo, inherit);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.csct-reviews__body { display: flex; flex-direction: column; }
.csct-reviews__row { display: flex; align-items: center; white-space: nowrap; }
.csct-reviews__asof { white-space: nowrap; }
.csct-reviews__text { font-size: 13px; color: var(--csct-r-muted); }
.csct-reviews__asof { font-size: 12px; color: var(--csct-r-muted); }

/* Clear space: at 16px tall the wordmark's G is about 11.7px wide (17.54 of 24 units), so 12px all round. */
.csct-reviews__logowrap { display: block; padding: 12px; background: #fff; }
.csct-reviews__logo { display: block; width: auto; height: 16px; }

/* ---- Card: floats on the hero photo ---------------------------------- */
.csct-reviews--card,
.csct-reviews--form {
	gap: 16px;
	padding: 4px 6px 12px 20px;
	background: #fff;
	border-radius: 16px;
}
.csct-reviews--card .csct-reviews__score,
.csct-reviews--form .csct-reviews__score {
	font-size: 44px;
	padding: 8px 18px 0 0;
	border-right: 1px solid #e4ddd3;
	align-self: stretch;
	display: flex;
	align-items: center;
}
.csct-reviews--card .csct-reviews__asof,
.csct-reviews--form .csct-reviews__asof { padding-left: 2px; }
.csct-reviews--card {
	box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08), 0 12px 32px -8px rgba(17, 17, 17, 0.35);
	transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 200ms ease;
}
.csct-reviews--card:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 4px rgba(17, 17, 17, 0.08), 0 18px 40px -10px rgba(17, 17, 17, 0.42);
}
@media (prefers-reduced-motion: no-preference) {
	.csct-reviews--card { animation: csct-reviews-in 600ms 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes csct-reviews-in {
	from { opacity: 0; transform: translateY(8px); }
	to { opacity: 1; transform: none; }
}

/* Homepage slideshow: bottom right, above the slide arrows. */
.csct-hero__rating {
	position: absolute;
	right: var(--wp--preset--spacing--90, 64px);
	bottom: 104px;
	z-index: 2;
}

/* Tile pages: bottom left of the photo, inside the frame so the caption never moves it. */
.csct-prodhero__frame { position: relative; display: block; }
.csct-prodhero__frame .csct-reviews--card { position: absolute; left: 16px; bottom: 16px; }

@media (max-width: 900px) {
	/* Phones: the card takes the bottom-left corner under the hero copy; the slide dots move right. */
	.csct-hero { padding-bottom: 104px; }
	.csct-hero__rating { left: 16px; right: auto; bottom: 20px; }
	.csct-hero__dots { left: auto; right: 24px; bottom: 46px; }
}
@media (max-width: 400px) {
	/* Too narrow for card and dots side by side: the dots sit just above the card. */
	.csct-hero { padding-bottom: 128px; }
	.csct-hero__dots { left: 20px; right: auto; bottom: 100px; }
}
@media (max-width: 600px) {
	.csct-reviews--card { gap: 12px; padding: 2px 4px 10px 14px; border-radius: 14px; }
	.csct-reviews--card .csct-reviews__score { font-size: 34px; padding-right: 12px; }
	.csct-reviews--card .csct-reviews__logowrap { padding: 10px; } /* 13px wordmark: G is 9.5px */
	.csct-reviews--card .csct-reviews__logo { height: 13px; }
	.csct-prodhero__frame .csct-reviews--card { left: 12px; bottom: 12px; }
}
@media (max-width: 360px) {
	/* Photo is too narrow to hold the card: it hangs off the photo's bottom edge instead. */
	.csct-prodhero__frame .csct-reviews--card { position: relative; left: auto; bottom: auto; margin: -28px 0 0 8px; }
}

/* ---- Form: same card, flat, on the form panel ------------------------ */
.csct-reviews--form { margin: 0 0 16px; border: 1px solid #e4ddd3; }

/* ---- Bar: slim white sticky strip on pages without a hero card ------- */
.csct-reviewbar {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 60;
	display: flex;
	justify-content: center;
	padding: 0 16px;
	background: #fff;
	border-bottom: 1px solid #ece6dd;
}
.csct-reviews--bar { gap: 8px; font-size: 13px; }
.csct-reviews--bar .csct-reviews__score { font-size: 15px; }
.csct-reviews--bar .csct-reviews__body { flex-direction: row; align-items: center; gap: 0; }
.csct-reviews--bar .csct-reviews__logowrap { padding: 11px; } /* 14px wordmark: G is 10.2px */
.csct-reviews--bar .csct-reviews__logo { height: 14px; }
.csct-reviews--bar .csct-reviews__cta {
	margin-left: 10px;
	padding-left: 18px;
	border-left: 1px solid #e4ddd3;
	font-size: 13px;
	font-weight: 600;
	color: #a24f12;
}
.csct-reviews--bar:hover .csct-reviews__cta { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
	.csct-reviews--bar .csct-reviews__cta { display: none; }
}
/* Other sticky panels sit below the strip instead of sliding under it. */
body:has(.csct-reviewbar) .csct-aside__sample,
body:has(.csct-reviewbar) .csct-fitgrid__filters { top: calc(var(--wp-admin--admin-bar--height, 0px) + 64px); }

/* "See all fittings" link under the tile page system boxes. */
.csct-fit__all { margin: 28px 0 0; text-align: center; }
