/* GetLeads Reviews — Frontend Styles */

.gl-reviews-wrap {
	--gl-card-bg: #ffffff;
	--gl-card-text: #1a1a1a;
	--gl-star-color: #f5a623;
	box-sizing: border-box;
}

/* ── Grid ────────────────────────────────────────────────────────────────── */
.gl-grid {
	display: grid;
	gap: 1.5rem;
}

/* ── Slider wrapper ──────────────────────────────────────────────────────── */
.gl-slider-wrap {
	position: relative;
}

.gl-swiper {
	overflow: hidden;
	padding-bottom: 2.5rem; /* space for pagination dots */
}

.gl-swiper .swiper-slide {
	height: auto;
}

/* ── Arrows ──────────────────────────────────────────────────────────────── */
.gl-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s;
	padding: 0;
	line-height: 1;
}

.gl-arrow:hover {
	background: #f9fafb;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.gl-arrow svg {
	width: 18px;
	height: 18px;
	stroke: #374151;
}

.gl-arrow-prev { left: -20px; }
.gl-arrow-next { right: -20px; }

/* ── Review Card ─────────────────────────────────────────────────────────── */
.gl-review-card {
	background: var(--gl-card-bg);
	color: var(--gl-card-text);
	padding: 1.25rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	height: 100%;
	transition: transform 0.2s;
}

.gl-review-card:hover {
	transform: translateY(-2px);
}

/* ── Card Header ─────────────────────────────────────────────────────────── */
.gl-card-header {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.gl-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.gl-reviewer-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.gl-reviewer-name {
	font-weight: 600;
	font-size: 0.9375em;
	line-height: 1.3;
}

.gl-review-date {
	font-size: 0.8125em;
	opacity: 0.6;
}

/* ── Platform icon ───────────────────────────────────────────────────────── */
.gl-platform-icon {
	flex-shrink: 0;
	margin-left: auto;
}

.gl-platform-icon svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* ── Star Rating ─────────────────────────────────────────────────────────── */
.gl-star-rating {
	display: flex;
	gap: 1px;
	font-size: 1rem;
	line-height: 1;
}

.gl-star--filled {
	color: var(--gl-star-color);
}

.gl-star--empty {
	color: #d1d5db;
}

/* ── Review Text ─────────────────────────────────────────────────────────── */
.gl-review-text {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.gl-excerpt,
.gl-full-text {
	font-size: 0.9em;
	line-height: 1.6;
	margin: 0;
}

.gl-read-more-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--gl-star-color);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ── Rating summary box ──────────────────────────────────────────────────── */
.gl-rating-box {
	display: inline-flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 1rem 1.5rem;
	border-radius: 10px;
	margin-bottom: 1.5rem;
}

.gl-rating-box-line1 {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.gl-rating-box-google-icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

.gl-rating-box-label {
	font-size: 0.9375em;
	font-weight: 600;
	opacity: 0.75;
	letter-spacing: 0.01em;
}

.gl-rating-box-line2 {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	flex-wrap: wrap;
}

.gl-rating-box-score {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
}

.gl-rating-box-stars {
	display: flex;
	gap: 1px;
}

.gl-rating-box-count {
	font-size: 0.875em;
	opacity: 0.7;
}

/* ── Reviewer links ──────────────────────────────────────────────────────── */
.gl-avatar-link {
	flex-shrink: 0;
	display: block;
	line-height: 0;
}

.gl-reviewer-name-link {
	text-decoration: none;
	color: inherit;
}

.gl-reviewer-name-link:hover .gl-reviewer-name {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ── Business summary header ─────────────────────────────────────────────── */
.gl-summary-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0 1.25rem;
	flex-wrap: wrap;
}

.gl-summary-left {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}

.gl-summary-platform {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.gl-summary-google-icon {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.gl-summary-platform-label {
	font-size: 0.875em;
	font-weight: 600;
	opacity: 0.7;
}

.gl-summary-rating-block {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.gl-summary-score {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
}

.gl-summary-stars {
	display: flex;
	gap: 1px;
}

/* Fractional star: base char is the "empty" colour; ::before overlays fill */
.gl-summary-star {
	display: inline-block;
	position: relative;
	font-size: 1.35rem;
	line-height: 1;
	color: #d1d5db;
}

.gl-summary-star::before {
	content: '★';
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	width: var(--fill, 0%);
	color: var(--gl-star-color, #f5a623);
	white-space: nowrap;
}

.gl-summary-count {
	font-size: 0.875em;
	opacity: 0.7;
}

.gl-summary-count a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gl-write-review-btn {
	display: inline-block;
	padding: 0.5rem 1.25rem;
	border: 2px solid currentColor;
	border-radius: 6px;
	font-size: 0.875em;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
}

.gl-write-review-btn:hover {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: #fff;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.hidden {
	display: none !important;
}

/* ── Load More ───────────────────────────────────────────────────────────── */
.gl-load-more-wrap {
	text-align: center;
	margin-top: 2rem;
}

.gl-load-more-btn {
	display: inline-block;
	padding: 0.65rem 2rem;
	background: transparent;
	border: 2px solid currentColor;
	border-radius: 6px;
	font-size: 0.9375em;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	color: inherit;
	line-height: 1.4;
}

.gl-load-more-btn:hover {
	background: #1a1a1a;
	border-color: #1a1a1a;
	color: #fff;
}

/* ── Responsive fallback ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
	.gl-arrow-prev { left: -12px; }
	.gl-arrow-next { right: -12px; }
	.gl-arrow { width: 34px; height: 34px; }
}

/* ══════════════════════════════════════════════════════════════════════════
   Card Layout Variations
   ══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Centered — avatar protrudes above card, all content centred ──────── */
.gl-card--centered {
	position: relative;
	padding-top: 52px;
	text-align: center;
	align-items: center;
}

.gl-card--centered .gl-card-header {
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
}

.gl-card--centered .gl-avatar {
	position: absolute;
	top: -24px;
	left: 50%;
	transform: translateX(-50%);
	width: 52px;
	height: 52px;
	border: 3px solid var(--gl-card-bg);
	box-shadow: 0 0 0 2px var(--gl-card-border-color, #e5e7eb);
	z-index: 2;
}

.gl-card--centered .gl-reviewer-info {
	align-items: center;
	text-align: center;
}

/* Google icon: absolute top-left, removed from flex flow */
.gl-card--centered .gl-platform-icon {
	position: absolute;
	top: 0.875rem;
	left: 0.875rem;
	margin-left: 0;
}

/* Hide the date from inside the reviewer-info block */
.gl-card--centered .gl-reviewer-info .gl-review-date {
	display: none;
}

/* Stars + rating number row */
.gl-card--centered .gl-star-rating {
	justify-content: center;
	align-items: center;
	gap: 0.3rem;
	font-size: 20px;
}

/* Rating number (e.g. "5.0") shown before the stars */
.gl-rating-value {
	display: none;
}
.gl-card--centered .gl-rating-value {
	display: inline;
	font-weight: 700;
	font-size: 0.9rem;
	line-height: 1;
	color: var(--gl-card-text);
	margin-right: 0.1rem;
}

/* Date placed below the stars row */
.gl-centered-date {
	display: none;
}
.gl-card--centered .gl-centered-date {
	display: block;
	font-size: 0.8125em;
	opacity: 0.6;
	text-align: center;
	margin-top: -0.25rem;
}

/* Grid: extra row-gap so protruding avatars don't overlap the card above */
.gl-grid[data-card-style="centered"] {
	padding-top: 28px;
	row-gap: 3rem;
}

/* Slider: pad the swiper inward so overflow:hidden doesn't clip the avatar */
.gl-slider-wrap[data-card-style="centered"] .gl-swiper {
	padding-top: 28px;
}

/* ── 2. Horizontal — reviewer left panel, content right ──────────────────── */
.gl-card--horizontal {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"side stars"
		"side text";
	column-gap: 1rem;
	row-gap: 0.5rem;
	padding: 1.25rem 1.5rem;
}

.gl-card--horizontal .gl-card-header {
	grid-area: side;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-right: 1px solid var(--gl-card-border-color, #e5e7eb);
	padding-right: 1rem;
}

.gl-card--horizontal .gl-avatar {
	width: 56px;
	height: 56px;
}

.gl-card--horizontal .gl-reviewer-info {
	align-items: center;
	text-align: center;
}

.gl-card--horizontal .gl-platform-icon {
	margin-left: 0;
}

.gl-card--horizontal .gl-star-rating {
	grid-area: stars;
	align-self: end;
}

.gl-card--horizontal .gl-review-text {
	grid-area: text;
}

/* ── 3. Quote — large decorative quote mark, reviewer footer ─────────────── */
.gl-card--quote {
	position: relative;
}

.gl-card--quote::before {
	content: '\201C';
	position: absolute;
	top: 0.25rem;
	left: 1rem;
	font-size: 5rem;
	line-height: 1;
	font-family: Georgia, serif;
	color: var(--gl-star-color);
	opacity: 0.15;
	pointer-events: none;
	z-index: 0;
}

.gl-card--quote .gl-star-rating {
	order: 1;
}

.gl-card--quote .gl-review-text {
	order: 2;
	position: relative;
	z-index: 1;
	padding-top: 1.75rem;
}

.gl-card--quote .gl-card-header {
	order: 3;
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid var(--gl-card-border-color, #e5e7eb);
}

/* ── 4. Minimal — no card chrome, stars + text + slim reviewer row ───────── */
.gl-card--minimal {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
	padding: 1rem 0.25rem;
}

.gl-card--minimal .gl-star-rating {
	order: 1;
}

.gl-card--minimal .gl-review-text {
	order: 2;
}

.gl-card--minimal .gl-card-header {
	order: 3;
	margin-top: 0.5rem;
	padding-top: 0.75rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

/* ── 5. Feature — coloured top bar, avatar straddling the bar edge ───────── */
.gl-card--feature {
	position: relative;
	padding-top: 80px;
	text-align: center;
	align-items: center;
	overflow: hidden;
}

.gl-card--feature::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 48px;
	background: var(--gl-star-color);
	z-index: 0;
}

.gl-card--feature .gl-avatar {
	position: absolute;
	top: 24px;
	left: 50%;
	transform: translateX(-50%);
	width: 52px;
	height: 52px;
	border: 3px solid var(--gl-card-bg);
	z-index: 2;
}

.gl-card--feature .gl-card-header {
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
}

.gl-card--feature .gl-reviewer-info {
	align-items: center;
	text-align: center;
}

.gl-card--feature .gl-platform-icon {
	margin-left: 0;
}

.gl-card--feature .gl-star-rating {
	justify-content: center;
}

/* ── 6. Split — coloured left panel with reviewer, white right for review ── */
.gl-card--split {
	display: grid;
	grid-template-columns: 36% 1fr;
	grid-template-rows: auto 1fr;
	grid-template-areas:
		"side stars"
		"side text";
	padding: 0;
	overflow: hidden;
	gap: 0;
}

.gl-card--split .gl-card-header {
	grid-area: side;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: var(--gl-star-color);
	padding: 1.5rem 0.75rem;
}

.gl-card--split .gl-avatar {
	border: 2px solid rgba(255, 255, 255, 0.55);
}

.gl-card--split .gl-reviewer-info {
	align-items: center;
	text-align: center;
}

.gl-card--split .gl-reviewer-name,
.gl-card--split .gl-review-date {
	color: #fff;
}

.gl-card--split .gl-review-date {
	opacity: 0.8;
}

.gl-card--split .gl-platform-icon {
	margin-left: 0;
}

.gl-card--split .gl-platform-icon svg {
	filter: brightness(0) invert(1);
	opacity: 0.85;
}

.gl-card--split .gl-star-rating {
	grid-area: stars;
	align-self: end;
	padding: 1rem 1.25rem 0.5rem;
}

.gl-card--split .gl-review-text {
	grid-area: text;
	padding: 0 1.25rem 1.25rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   Social Proof Popup
   ══════════════════════════════════════════════════════════════════════════ */

.gl-popup-wrap {
	position: fixed;
	bottom: 1.5rem;
	left: 1.5rem;
	z-index: 99999;
	width: 320px;
	max-width: calc(100vw - 3rem);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, .18);
	padding: 0.875rem 0.875rem 0.875rem 0.875rem;
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.gl-popup--down {
	transform: translateY(calc(100% + 2rem));
	opacity: 0;
	pointer-events: none;
}

.gl-popup--up {
	transform: translateY(0);
	opacity: 1;
	pointer-events: auto;
}

.gl-popup-close {
	position: absolute;
	top: 0.4rem;
	right: 0.4rem;
	width: 22px;
	height: 22px;
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	color: #9ca3af;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.gl-popup-close:hover {
	color: #374151;
	background: #f3f4f6;
}

.gl-popup-row {
	display: flex;
	align-items: flex-start;
	gap: 0.7rem;
}

.gl-popup-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.gl-popup-avatar--initials {
	background: #e5e7eb;
	color: #374151;
	font-weight: 700;
	font-size: 1.1rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gl-popup-body {
	flex: 1;
	min-width: 0;
}

.gl-popup-headline {
	font-size: 0.9rem;
	line-height: 1.4;
	margin: 0 0 0.3rem;
	color: #1a1a1a;
	padding-right: 1.25rem;
}

.gl-popup-stars {
	display: flex;
	gap: 1px;
	font-size: 0.9375rem;
	margin-bottom: 0.3rem;
	line-height: 1;
}

.gl-popup-star--filled {
	color: #f5a623;
}

.gl-popup-star--empty {
	color: #d1d5db;
}

.gl-popup-meta {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	font-size: 0.8rem;
	color: #6b7280;
	margin: 0;
}

.gl-popup-google-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}
