/* Revive Reviews */

.rh-reviews,
.rh-google-rating {
	--rhr-card: var(--rh-color-whitewood, #f2ecdf);
	--rhr-star: #f1b51c;
	--rhr-star-empty: rgba(44, 44, 42, 0.14);
	--rhr-name-colour: var(--rh-color-ink, #2c2c2a);
	--rhr-text-colour: var(--rh-color-ink, #2c2c2a);
	--rhr-dot: #8d8a83;
	--rhr-badge: var(--rh-color-eucalyptus, #6b7a5e);
	--rhr-badge-text: var(--rh-color-cloud, #fbf8f2);
	--rhr-name-size: clamp(1.1875rem, 1.12rem + 0.3vw, 1.375rem);
	--rhr-text-size: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
	--rhr-radius: 12px;
	--rhr-gap: clamp(16px, 8px + 2vw, 40px);
	--rhr-lines: 8;
	--rhr-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Slider ---------- */
.rh-reviews {
	--rhr-n: var(--rhr-per-phone, 1);
	--rhr-peek: 12%;
	--rhr-peek-gap: var(--rhr-gap);
	position: relative;
	margin: 0 auto;
}
@media (min-width: 768px) {
	.rh-reviews { --rhr-n: var(--rhr-per-tablet, 2); --rhr-peek: 0px; --rhr-peek-gap: 0px; }
}
@media (min-width: 1024px) {
	.rh-reviews { --rhr-n: var(--rhr-per, 3); }
}

.rh-reviews__track {
	display: flex;
	align-items: flex-start;
	gap: var(--rhr-gap);
	margin: 0;
	padding: 4px 0 6px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.rh-reviews__track::-webkit-scrollbar { display: none; }
.rh-reviews__track:focus { outline: none; }
.rh-reviews__track:focus-visible { outline: 2px solid var(--rh-color-deep, #5d6b51); outline-offset: 4px; border-radius: var(--rhr-radius); }
.rh-reviews.is-dragging .rh-reviews__track { scroll-snap-type: none; scroll-behavior: auto; cursor: grabbing; user-select: none; }
.rh-reviews.is-dragging .rh-review a { pointer-events: none; }

/* ---------- Card ---------- */
.rh-review {
	flex: 0 0 calc((100% - (var(--rhr-n) - 1) * var(--rhr-gap) - var(--rhr-peek-gap) - var(--rhr-peek)) / var(--rhr-n));
	box-sizing: border-box;
	min-width: 0;
	min-height: var(--rhr-row-h, 0px);
	margin: 0;
	padding: clamp(22px, 18px + 1vw, 30px) clamp(22px, 18px + 1vw, 32px) clamp(24px, 20px + 1vw, 32px);
	scroll-snap-align: start;
	color: var(--rhr-text-colour);
	background: var(--rhr-card);
	border-radius: var(--rhr-radius);
	transition: box-shadow 0.5s var(--rhr-ease);
}
.rh-review.is-open { box-shadow: 0 18px 40px -24px rgba(44, 44, 42, 0.35); }

.rh-review__stars { font-size: 15px; margin-bottom: 12px; }

.rh-review__name {
	margin: 0 0 14px;
	font-family: var(--rh-font-heading, Georgia, serif);
	font-size: var(--rhr-name-size);
	font-weight: 400;
	line-height: 1.25;
	color: var(--rhr-name-colour);
}
.rh-review__name a { color: inherit; text-decoration: none; }
.rh-review__name a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

/* The text is cut to a set number of lines; "More" opens the rest smoothly */
.rh-review__body {
	--rhr-lh: 1.65;
	position: relative;
	max-height: calc(var(--rhr-lines) * var(--rhr-lh) * 1em);
	overflow: hidden;
	font-size: var(--rhr-text-size);
	line-height: var(--rhr-lh);
	transition: max-height 0.7s var(--rhr-ease);
}
.rh-review.is-open .rh-review__body { max-height: none; }
.rh-review__text p { margin: 0 0 calc(var(--rhr-lh) * 1em); /* a whole line, so the cut-off always lands between lines */ font-size: inherit; line-height: inherit; color: inherit; }
.rh-review__text p:last-child { margin-bottom: 0; }

.rh-review__more {
	position: absolute;
	right: 0;
	bottom: 0;
	display: inline-flex;
	align-items: baseline;
	margin: 0;
	padding: 0 0 0 2.4em;
	font: inherit;
	font-weight: 600;
	line-height: inherit;
	color: var(--rhr-name-colour);
	background: linear-gradient(to right, transparent, var(--rhr-card) 2.2em);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.rh-review__more[hidden] { display: none; }
.rh-review__ellipsis { font-weight: 400; }
.rh-review__more-label { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color 0.3s ease; }
.rh-review__more:hover .rh-review__more-label { text-decoration-color: currentColor; }
.rh-review__more:focus-visible { outline: 2px solid var(--rh-color-deep, #5d6b51); outline-offset: 2px; }
.rh-review.is-open .rh-review__more { position: static; margin-top: 0.6em; padding: 0; background: none; }
.rh-review.is-open .rh-review__ellipsis { display: none; }

.rh-review__date { margin: 14px 0 0; font-size: 0.8125rem; color: var(--rh-color-muted, #6e6a62); }

/* ---------- Dots ---------- */
.rh-reviews__dots {
	display: flex;
	justify-content: center;
	gap: 4px;
	margin-top: clamp(16px, 12px + 1vw, 24px);
}
.rh-reviews__dots:empty { display: none; }
.rh-reviews__dot {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.rh-reviews__dot::before {
	content: "";
	width: 10px;
	height: 10px;
	box-sizing: border-box;
	border: 1.5px solid var(--rhr-dot);
	border-radius: 50%;
	transition: background-color 0.4s var(--rhr-ease), transform 0.4s var(--rhr-ease);
}
.rh-reviews__dot:hover::before { transform: scale(1.2); }
.rh-reviews__dot[aria-current="true"]::before { background: var(--rhr-dot); }
.rh-reviews__dot:focus-visible { outline: 2px solid var(--rh-color-deep, #5d6b51); outline-offset: -2px; }

/* ---------- Stars ---------- */
.rh-stars {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	line-height: 0;
	white-space: nowrap;
}
.rh-stars__base,
.rh-stars__fill { display: flex; gap: 0.12em; }
.rh-stars svg { display: block; flex: none; width: 1em; height: 1em; max-width: none; margin: 0; fill: currentColor; }
.rh-stars__base { color: var(--rhr-star-empty); }
.rh-stars__fill {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--rhr-fill, 100%);
	overflow: hidden;
	color: var(--rhr-star);
}

/* ---------- Gentle reveal as the slider scrolls into view ---------- */
.rh-reviews.is-armed .rh-review { opacity: 0; transform: translateY(18px); }
.rh-reviews.is-in .rh-review {
	opacity: 1;
	transform: none;
	transition: opacity 0.9s var(--rhr-ease) calc(min(var(--i), 4) * 0.12s), transform 0.9s var(--rhr-ease) calc(min(var(--i), 4) * 0.12s), box-shadow 0.5s var(--rhr-ease);
}
.rh-reviews.is-arming * { transition: none !important; }

/* ---------- Google rating badge ---------- */
.rh-google-rating-wrap { display: flex; justify-content: center; margin-top: clamp(28px, 20px + 2vw, 48px); }
.rh-google-rating-wrap--left { justify-content: flex-start; }
.rh-google-rating-wrap--right { justify-content: flex-end; }
.rh-reviews + .rh-google-rating-wrap { margin-top: clamp(32px, 24px + 2.5vw, 56px); }
.wpb_wrapper > .rh-google-rating-wrap:first-child { margin-top: 0; }

.rh-google-rating {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 14px 26px 14px 20px;
	color: var(--rhr-badge-text);
	text-decoration: none;
	background: var(--rhr-badge);
	border-radius: 2px;
	transition: transform 0.5s var(--rhr-ease), box-shadow 0.5s var(--rhr-ease);
}
a.rh-google-rating:hover,
a.rh-google-rating:focus-visible { color: var(--rhr-badge-text); transform: translateY(-2px); box-shadow: 0 12px 28px -16px rgba(44, 44, 42, 0.55); }
a.rh-google-rating:focus-visible { outline: 2px solid var(--rhr-badge); outline-offset: 3px; }
.rh-google-rating__logo { display: block; width: auto; height: 44px; max-width: none; }
.rh-google-rating__text { display: flex; flex-direction: column; gap: 3px; text-align: left; }
.rh-google-rating__label {
	font-family: var(--rh-font-heading, Georgia, serif);
	font-size: 1.1875rem;
	line-height: 1.1;
}
.rh-google-rating__score { display: flex; align-items: center; gap: 8px; }
.rh-google-rating__num { font-family: var(--rh-font-heading, Georgia, serif); font-size: 1.0625rem; line-height: 1; }
.rh-google-rating__stars { font-size: 14px; }
.rh-google-rating .rh-stars__base { color: rgba(255, 255, 255, 0.22); }
.rh-google-rating__count { font-size: 0.75rem; opacity: 0.85; }

.rh-reviews .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.rh-reviews__track { scroll-behavior: auto; }
	.rh-reviews.is-armed .rh-review { opacity: 1; transform: none; }
	.rh-review__body,
	.rh-review,
	.rh-google-rating { transition: none !important; }
}
