/**
 * LH Google Reviews footer carousel.
 *
 * Native replacement for the retired TrustIndex free widget. Scroll-snap
 * carousel with arrows + dots, Google-style avatar cards. Scoped under
 * .lh-greviews (BEM). Palette: navy #1b2a4a, magenta #c0267e, gold stars.
 *
 * @since 1.1.0
 */

.lh-greviews {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	text-align: center;
	font-family: inherit;
}

.lh-greviews__inner {
	padding: 8px 0 4px;
}

/* ---- Summary header ---- */
.lh-greviews__head {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	margin-bottom: 24px;
}

.lh-greviews__head .lh-greviews__glogo {
	width: 30px;
	height: 30px;
	flex: 0 0 auto;
}

.lh-greviews__glogo {
	width: 30px;
	height: 30px;
}

.lh-greviews__summary {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: center;
}

.lh-greviews__rating {
	font-size: 22px;
	font-weight: 700;
	color: #1b2a4a;
	line-height: 1;
}

.lh-greviews__count {
	font-size: 15px;
	color: #4a5568;
	line-height: 1;
}

.lh-greviews__count strong {
	color: #1b2a4a;
	font-weight: 700;
}

/* ---- Star row ---- */
.lh-greviews__stars {
	display: inline-flex;
	gap: 2px;
	vertical-align: middle;
}

.lh-greviews__star {
	width: 17px;
	height: 17px;
	fill: #fbbc05;
	flex: 0 0 auto;
}

/* ---- Carousel frame ---- */
.lh-greviews__carousel {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
}

.lh-greviews__track {
	list-style: none;
	margin: 0;
	padding: 6px 2px;
	display: flex;
	gap: 20px;
	flex: 1 1 auto;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.lh-greviews__track::-webkit-scrollbar {
	display: none;
}

/* ---- Cards ---- */
.lh-greviews__card {
	flex: 0 0 calc((100% - 40px) / 3);
	scroll-snap-align: start;
	background: #ffffff;
	border: 1px solid #e6e8ec;
	border-radius: 14px;
	padding: 22px 22px 20px;
	text-align: left;
	display: flex;
	flex-direction: column;
	box-shadow: 0 3px 14px rgba(27, 42, 74, 0.06);
}

.lh-greviews__card-top {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.lh-greviews__avatar {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
}

.lh-greviews__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 auto;
	min-width: 0;
}

.lh-greviews__card-top .lh-greviews__glogo {
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	opacity: 0.9;
}

.lh-greviews__name {
	font-weight: 700;
	color: #1b2a4a;
	font-size: 15px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.lh-greviews__locale {
	font-size: 13px;
	color: #8a93a6;
	display: inline-flex;
	align-items: center;
}

.lh-greviews__flag {
	width: 18px;
	height: 14px;
	margin-right: 6px;
	border-radius: 2px;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgba(27, 42, 74, 0.12);
	flex: 0 0 auto;
}

.lh-greviews__card .lh-greviews__stars {
	margin-bottom: 10px;
}

.lh-greviews__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: #3a4356;
	flex: 1 1 auto;
}

/* ---- Nav arrows ---- */
.lh-greviews__nav {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #e0e3ea;
	background: #ffffff;
	color: #1b2a4a;
	cursor: pointer;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	box-shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lh-greviews.is-ready .lh-greviews__nav {
	display: inline-flex;
}

.lh-greviews__nav svg {
	width: 20px;
	height: 20px;
}

.lh-greviews__nav:hover,
.lh-greviews__nav:focus-visible {
	background: #c0267e;
	border-color: #c0267e;
	color: #ffffff;
}

/* ---- Dots ---- */
.lh-greviews__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 18px;
}

.lh-greviews__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #cfd5e0;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.lh-greviews__dot.is-active {
	background: #c0267e;
	transform: scale(1.25);
}

/* ---- More link ---- */
.lh-greviews__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	font-size: 15px;
	font-weight: 600;
	color: #c0267e;
	text-decoration: none;
	transition: gap 0.15s ease;
}

.lh-greviews__more:hover,
.lh-greviews__more:focus {
	color: #a01f69;
	gap: 10px;
	text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.lh-greviews__card {
		flex-basis: calc((100% - 20px) / 2);
	}
}

@media (max-width: 600px) {
	.lh-greviews__card {
		flex-basis: 100%;
	}

	.lh-greviews.is-ready .lh-greviews__nav {
		display: none;
	}

	.lh-greviews__head {
		margin-bottom: 18px;
	}
}
