/**
 * Google Reviews Slider for Elementor
 * Loaded only on pages that contain the widget.
 * Visual values below are fallbacks; Elementor style controls override them.
 */

.grse-reviews {
	--grse-spv: 3;
	--grse-gap: 22px;
	--grse-quote-overlap: 22px;
	--grse-dot: 10px;
	--grse-lines: 6;
	--grse-accent: #6b2150;
	position: relative;
	width: 100%;
}

.grse-reviews .grse-slider {
	position: relative;
}

/* ---- Minimal carousel core (scoped; independent of the theme/Elementor Swiper CSS) ---- */
.grse-reviews .grse-swiper {
	position: relative;
	overflow: hidden;
	overflow: clip; /* stops focus/scrollIntoView from shifting the track */
	margin: 0;
	padding: 0;
	list-style: none;
	z-index: 1;
	touch-action: pan-y;
}

.grse-reviews .grse-swiper .swiper-wrapper {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: stretch;
	width: 100%;
	height: auto;
	box-sizing: content-box;
	transition-property: transform;
	transition-timing-function: ease;
}

.grse-reviews .grse-swiper .swiper-slide {
	position: relative;
	display: flex;
	flex-shrink: 0;
	width: 100%;
	height: auto; /* equal heights: slides stretch to the tallest one */
	box-sizing: border-box;
	padding-top: var(--grse-quote-overlap); /* room for the quote mark above the card */
	transition-property: transform, opacity;
}

/*
 * Some Elementor stylesheets (e.g. Nested Carousel) clip any not-yet-initialised
 * Swiper track with overflow:hidden + gap. Our track must never be clipped: the
 * outer .grse-swiper already hides what is off-screen.
 */
.grse-reviews .grse-swiper.swiper > .swiper-wrapper,
.grse-reviews .grse-swiper.swiper-container > .swiper-wrapper {
	overflow: visible;
	gap: 0;
}

/* Correct layout before JS initialises (and without JS). */
.grse-reviews .grse-swiper:not(.swiper-initialized):not(.swiper-container-initialized) .swiper-slide {
	width: calc((100% - (var(--grse-spv) - 1) * var(--grse-gap)) / var(--grse-spv));
	margin-inline-end: var(--grse-gap);
}

.grse-reviews .grse-swiper.swiper-fade .swiper-slide,
.grse-reviews .grse-swiper.swiper-container-fade .swiper-slide {
	pointer-events: none;
	transition-property: opacity;
}

.grse-reviews .grse-swiper.swiper-fade .swiper-slide-active,
.grse-reviews .grse-swiper.swiper-container-fade .swiper-slide-active {
	pointer-events: auto;
}

.grse-reviews .grse-swiper .swiper-notification {
	position: absolute;
	left: 0;
	top: 0;
	opacity: 0;
	pointer-events: none;
	z-index: -1000;
}

/* ---- Card ---- */
.grse-reviews .grse-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	box-sizing: border-box;
	padding: 56px 38px 34px;
	background: #fff;
	border-radius: 32px;
	color: #1f1f1f;
}

.grse-reviews .grse-quote {
	position: absolute;
	top: calc(var(--grse-quote-overlap) * -1);
	left: 18px;
	width: 64px;
	line-height: 0;
	color: var(--grse-accent);
	pointer-events: none;
}

.grse-reviews .grse-quote svg {
	display: block;
	width: 100%;
	height: auto;
}

.grse-reviews .grse-body {
	flex: 1 1 auto; /* pushes divider + footer to the bottom so they align across cards */
	min-width: 0;
	font-size: 18px;
	line-height: 1.55;
}

.grse-reviews .grse-text {
	margin: 0;
	overflow-wrap: anywhere;
	word-break: normal;
}

.grse-truncate-yes .grse-reviews .grse-text:not(.is-expanded) {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--grse-lines);
	line-clamp: var(--grse-lines);
	overflow: hidden;
}

/* Expanded text scrolls inside the card so one long review does not stretch every card in the row. */
.grse-truncate-yes .grse-reviews .grse-text.is-expanded {
	max-height: calc(var(--grse-lines) * 1.55em * 2);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-inline-end: 6px;
	scrollbar-width: thin;
}

.grse-reviews .grse-more,
.grse-reviews .grse-more:hover,
.grse-reviews .grse-more:focus {
	display: inline-block;
	margin: 8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--grse-accent);
	font: inherit;
	font-size: 0.9em;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.grse-reviews .grse-more[hidden] {
	display: none;
}

.grse-reviews .grse-divider {
	width: 100%;
	height: 0;
	margin: 26px 0 16px;
	border: 0;
	border-top: 2px solid #d9d9d9;
	background: none;
	opacity: 1;
}

.grse-reviews .grse-footer {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.grse-reviews .grse-avatar {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	margin-inline-end: 2px;
	border-radius: 50%;
	object-fit: cover;
}

.grse-reviews .grse-avatar--initial {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #efe6eb;
	color: var(--grse-accent);
	font-weight: 600;
	font-size: 1.2em;
}

.grse-reviews .grse-meta {
	flex: 1 1 auto;
	min-width: 0;
}

.grse-reviews .grse-name {
	overflow: hidden;
	color: #111;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.grse-reviews .grse-name a {
	color: inherit;
	text-decoration: none;
}

.grse-reviews .grse-name a:hover,
.grse-reviews .grse-name a:focus-visible {
	text-decoration: underline;
}

.grse-reviews .grse-stars {
	display: flex;
	flex-wrap: wrap;
	gap: 3px;
	margin-top: 6px;
	line-height: 0;
}

.grse-reviews .grse-star {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	color: #dadada;
}

.grse-reviews .grse-star.is-on {
	color: #f8cb46;
}

.grse-reviews .grse-date {
	display: block;
	margin-top: 6px;
	color: #777;
	font-size: 14px;
	line-height: 1.3;
}

.grse-reviews .grse-google {
	display: inline-flex;
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	margin-top: 2px;
	line-height: 0;
}

.grse-reviews .grse-google svg {
	width: 100%;
	height: 100%;
}

/* ---- Arrows ---- */
.grse-reviews .grse-arrow,
.grse-reviews .grse-arrow:hover,
.grse-reviews .grse-arrow:focus {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #fff;
	color: var(--grse-accent);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	line-height: 0;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.grse-reviews .grse-arrow:hover,
.grse-reviews .grse-arrow:focus-visible {
	background-color: var(--grse-accent);
	color: #fff;
}

.grse-reviews .grse-arrow:focus-visible,
.grse-reviews .grse-dot:focus-visible,
.grse-reviews .grse-more:focus-visible {
	outline: 2px solid var(--grse-accent);
	outline-offset: 2px;
}

.grse-reviews .grse-arrow--prev {
	left: -24px;
}

.grse-reviews .grse-arrow--next {
	right: -24px;
}

.grse-reviews .grse-arrow svg {
	width: 18px;
	height: 18px;
}

.grse-reviews.grse-show-arrows .grse-arrow {
	display: inline-flex;
}

.grse-reviews .grse-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

.grse-reviews .grse-arrow.swiper-button-lock,
.grse-reviews.grse-no-overflow .grse-arrow {
	display: none;
}

/* ---- Dots ---- */
.grse-reviews .grse-dots {
	display: none;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
	line-height: 0;
}

.grse-reviews.grse-show-dots .grse-dots {
	display: flex;
}

.grse-reviews .grse-dots.swiper-pagination-lock,
.grse-reviews.grse-no-overflow .grse-dots {
	display: none;
}

.grse-reviews .grse-dot {
	display: inline-block;
	width: var(--grse-dot);
	height: var(--grse-dot);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #d8c9d2;
	opacity: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.grse-reviews .grse-dot.grse-dot--active {
	background-color: var(--grse-accent);
	transform: scale(1.2);
}

/* ---- Attribution ---- */
.grse-reviews .grse-attribution {
	margin-top: 16px;
	color: #6f6f6f;
	font-size: 13px;
	line-height: 1.4;
	text-align: center;
}

.grse-reviews .grse-dots + .grse-attribution {
	margin-top: 14px;
}

.grse-reviews .grse-attribution a {
	color: inherit;
	text-decoration: none;
}

.grse-reviews .grse-attribution a:hover,
.grse-reviews .grse-attribution a:focus-visible {
	text-decoration: underline;
}

/* ---- Editor-only notice ---- */
.grse-editor-notice {
	padding: 18px 20px;
	border: 1px dashed #c9b2c0;
	border-radius: 8px;
	background: #fbf7f9;
	color: #3c3c3c;
	font-size: 14px;
	line-height: 1.5;
}

.grse-editor-notice p {
	margin: 6px 0 0;
}

.grse-editor-notice__error {
	color: #b32d2e;
}

@media (prefers-reduced-motion: reduce) {
	.grse-reviews .grse-swiper .swiper-wrapper,
	.grse-reviews .grse-arrow,
	.grse-reviews .grse-dot {
		transition-duration: 0s !important;
	}
}

/* ---- Platform badges (manual reviews) ---- */
.grse-reviews .grse-badge {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	margin-top: 2px;
	line-height: 0;
	text-decoration: none;
}

.grse-reviews .grse-badge--logo img {
	display: block;
	width: auto;
	height: 24px;
	max-width: 120px;
	object-fit: contain;
}

.grse-reviews .grse-badge--text {
	padding: 5px 10px;
	border-radius: 999px;
	background: #f1ecef;
	color: #3a3a3a;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.grse-reviews a.grse-badge--text:hover,
.grse-reviews a.grse-badge--text:focus-visible {
	text-decoration: underline;
}
