/* ==========================================================================
   Contractor Finder — Google Reviews carousel & badge
   All styles are scoped under .cf-google-reviews. The first block explicitly
   resets img/a/button inside the scope to defend against Elementor's global
   styles leaking in.
   ========================================================================== */

/* ---------- Elementor-defensive element resets ---------- */

.cf-google-reviews,
.cf-google-reviews *,
.cf-google-reviews *::before,
.cf-google-reviews *::after {
	box-sizing: border-box;
}

.cf-google-reviews img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	object-fit: cover;
	vertical-align: middle;
}

.cf-google-reviews a {
	color: inherit;
	background: none;
	text-decoration: none;
	border: 0;
	padding: 0;
	margin: 0;
	font: inherit;
	box-shadow: none;
}
.cf-google-reviews a:hover,
.cf-google-reviews a:focus,
.cf-google-reviews a:active,
.cf-google-reviews a:visited {
	color: inherit;
	background: none;
	box-shadow: none;
}
.cf-google-reviews a:hover,
.cf-google-reviews a:focus {
	text-decoration: underline;
}

.cf-google-reviews button {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: 0;
	padding: 0;
	margin: 0;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-align: inherit;
	cursor: pointer;
	box-shadow: none;
}
.cf-google-reviews button:hover,
.cf-google-reviews button:focus,
.cf-google-reviews button:active {
	background: transparent;
	color: inherit;
	box-shadow: none;
	outline: none;
}
.cf-google-reviews button:focus-visible {
	outline: 2px solid #1a73e8;
	outline-offset: 2px;
}

.cf-google-reviews svg {
	display: inline-block;
	vertical-align: middle;
}


/* ---------- Wrapper ---------- */

.cf-google-reviews {
	--cf-gr-star: #fbbc04;
	--cf-gr-text: #202124;
	--cf-gr-muted: #5f6368;
	--cf-gr-border: #e8eaed;
	--cf-gr-card-bg: #ffffff;
	--cf-gr-accent: #1a73e8;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--cf-gr-text);
	line-height: 1.5;
	max-width: 1200px;
	margin: 24px auto;
	padding: 0 16px;
}


/* ---------- Header (rating summary) ---------- */

.cf-google-reviews__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	padding: 16px 20px;
	background: var(--cf-gr-card-bg);
	border: 1px solid var(--cf-gr-border);
	border-radius: 12px;
	margin: 0 48px 20px;
}

.cf-google-reviews__logo {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
}

.cf-google-reviews__summary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	flex: 1 1 auto;
	min-width: 0;
}

.cf-google-reviews__rating-number {
	font-size: 22px;
	font-weight: 700;
	color: var(--cf-gr-text);
	line-height: 1;
}

.cf-google-reviews__stars {
	display: inline-flex;
	align-items: center;
	gap: 1px;
	color: var(--cf-gr-star);
}

.cf-google-reviews__count {
	font-size: 14px;
	color: var(--cf-gr-muted);
}

.cf-google-reviews__see-all {
	font-size: 14px;
	font-weight: 500;
	color: var(--cf-gr-accent);
	flex: 0 0 auto;
}
.cf-google-reviews__see-all:hover,
.cf-google-reviews__see-all:focus {
	color: var(--cf-gr-accent);
	text-decoration: underline;
}

/* Shared small-link style (used by "See all on Google" and "Read more") */
.cf-google-reviews__small-link {
	font-size: 13px !important;
	font-weight: 400 !important;
	color: var(--cf-gr-muted) !important;
}
.cf-google-reviews__small-link:hover,
.cf-google-reviews__small-link:focus {
	color: var(--cf-gr-accent) !important;
	text-decoration: underline;
}

/* Badge-only variant — strips rigid sizing so it adapts to its parent container */
.cf-google-reviews--badge-only {
	max-width: none;
	margin: 0;
	padding: 0;
}
.cf-google-reviews--badge-only .cf-google-reviews__header {
	margin: 0;
	padding: 12px 16px;
	border-radius: 8px;
}


/* ---------- Carousel layout ---------- */

.cf-google-reviews__carousel {
	position: relative;
	padding: 0 48px;
}

.cf-google-reviews__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	padding: 4px 2px 16px;
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.cf-google-reviews__track::-webkit-scrollbar {
	display: none;
}


/* ---------- Cards ---------- */

.cf-google-reviews__card {
	flex: 0 0 100%;
	scroll-snap-align: start;
	background: var(--cf-gr-card-bg);
	border: 1px solid var(--cf-gr-border);
	border-radius: 12px;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-height: 200px;
	box-shadow: 0 1px 2px rgba(60, 64, 67, 0.06);
}

.cf-google-reviews__card-stars {
	display: flex;
	align-items: center;
	gap: 2px;
	color: var(--cf-gr-star);
}

.cf-google-reviews__card-text {
	font-size: 15px;
	color: var(--cf-gr-text);
	white-space: normal;
	word-break: break-word;
	flex: 1 1 auto;
}
.cf-google-reviews__card-text[data-collapsed="1"] {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.cf-google-reviews__toggle-more {
	align-self: flex-start;
	padding: 2px 0;
}

.cf-google-reviews__card-author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--cf-gr-border);
}

.cf-google-reviews__avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	flex: 0 0 auto;
	background: #e8eaed;
}

.cf-google-reviews__avatar--initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: var(--cf-gr-accent);
}

.cf-google-reviews__card-author-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.cf-google-reviews__author-name {
	font-size: 14px;
	font-weight: 600;
	color: var(--cf-gr-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
a.cf-google-reviews__author-name:hover,
a.cf-google-reviews__author-name:focus {
	color: var(--cf-gr-accent);
	text-decoration: underline;
}

.cf-google-reviews__author-time {
	font-size: 12px;
	color: var(--cf-gr-muted);
}


/* ---------- Arrows ---------- */

.cf-google-reviews__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px !important;
	height: 40px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	background: #fff !important;
	border: 1px solid var(--cf-gr-border) !important;
	border-radius: 50% !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	font-size: 24px !important;
	line-height: 1 !important;
	padding: 0 !important;
	color: var(--cf-gr-text) !important;
	box-shadow: 0 2px 6px rgba(60, 64, 67, 0.15);
	z-index: 2;
	transition: background 0.15s ease;
}
.cf-google-reviews__arrow:hover {
	background: #f8f9fa !important;
	color: var(--cf-gr-text) !important;
	box-shadow: 0 3px 8px rgba(60, 64, 67, 0.2);
}
.cf-google-reviews__arrow[disabled],
.cf-google-reviews__arrow[aria-disabled="true"] {
	opacity: 0.4;
	cursor: default;
}
.cf-google-reviews__arrow--prev {
	left: 0;
}
.cf-google-reviews__arrow--next {
	right: 0;
}


/* ---------- Dots ---------- */

.cf-google-reviews__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 8px;
}

.cf-google-reviews__dot {
	width: 8px !important;
	height: 8px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	border-radius: 50% !important;
	background: #dadce0 !important;
	border: none !important;
	padding: 0 !important;
	transition: background 0.2s ease, transform 0.2s ease;
}
.cf-google-reviews__dot:hover {
	background: #bdc1c6 !important;
}
.cf-google-reviews__dot.is-active {
	background: var(--cf-gr-accent) !important;
	transform: scale(1.15);
}


/* ---------- Stars (SVG) ---------- */

.cf-google-reviews__star {
	width: 16px;
	height: 16px;
	fill: currentColor;
}
.cf-google-reviews__card-stars .cf-google-reviews__star {
	width: 18px;
	height: 18px;
}


/* ---------- Empty state ---------- */

.cf-google-reviews__empty {
	text-align: center;
	font-size: 14px;
	color: var(--cf-gr-muted);
	padding: 20px;
	margin: 0;
}


/* ---------- Responsive: 2 cards tablet, 3 desktop ---------- */

@media (min-width: 640px) {
	.cf-google-reviews__card {
		flex-basis: calc((100% - 16px) / 2);
	}
}

@media (min-width: 960px) {
	.cf-google-reviews__card {
		flex-basis: calc((100% - 32px) / 3);
	}
}


/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.cf-google-reviews__track {
		scroll-behavior: auto;
	}
	.cf-google-reviews__arrow,
	.cf-google-reviews__dot {
		transition: none;
	}
}
