/**
 * Growsera Testimonials Carousel.
 * Card styling mirrors the previous hand-built Elementor cards; sizes and colours
 * are driven by the widget's Style controls.
 */

.gts {
	position: relative;
}

.gts-swiper {
	overflow: hidden;
	/* Grid/flex children default to min-width:auto, which lets the slider
	   expand to the full width of all slides. Keep it clamped. */
	min-width: 0;
}

/* Equal-height cards. */
.gts-swiper .swiper-slide {
	height: auto;
	display: flex;
}

.gts-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	border-style: solid;
	box-sizing: border-box;
}

.gts-quote {
	line-height: 0;
}

.gts-quote svg {
	display: block;
}

.gts-rating {
	position: relative;
	display: inline-flex;
	line-height: 0;
}

.gts-rating-base,
.gts-rating-fill {
	display: inline-flex;
	white-space: nowrap;
}

.gts-rating-fill {
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	overflow: hidden;
}

.gts-content {
	margin: 0;
}

.gts-content p:last-child {
	margin-bottom: 0;
}

/* Push the author block to the bottom so cards line up. */
.gts-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding-top: 6px;
}

.gts .gts-author .gts-avatar {
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.gts-author-meta {
	min-width: 0;
}

/* Arrows. */
.gts-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid rgba(15, 23, 42, 0.12);
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.gts-arrow:hover {
	transform: translateY(-50%) scale(1.06);
}

.gts-arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.gts-arrow svg {
	width: 60%;
	height: 60%;
}

.gts-arrow--prev {
	inset-inline-start: -10px;
}

.gts-arrow--next {
	inset-inline-end: -10px;
}

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

@media (max-width: 1024px) {
	.gts-arrow--prev {
		inset-inline-start: 0;
	}

	.gts-arrow--next {
		inset-inline-end: 0;
	}
}

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

.gts-dots .swiper-pagination-bullet {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	opacity: 1;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: width 0.2s ease;
}

.gts-dots .swiper-pagination-bullet-active {
	width: 26px;
	border-radius: 5px;
}

@media (prefers-reduced-motion: reduce) {
	.gts-arrow,
	.gts-dots .swiper-pagination-bullet {
		transition: none;
	}
}

/* Larger touch target for pagination bullets (visual size unchanged). */
.gts-dots .swiper-pagination-bullet {
	position: relative;
}

.gts-dots .swiper-pagination-bullet::after {
	content: "";
	position: absolute;
	inset: -14px -7px;
}

/* Desktop: keep arrows clear of the cards instead of overlapping the text. */
@media (min-width: 1025px) {
	.gts {
		padding-inline: 56px;
	}

	.gts-arrow--prev {
		inset-inline-start: 0;
	}

	.gts-arrow--next {
		inset-inline-end: 0;
	}
}

/* Tablet/mobile: arrows move below the slider, flanking the dots — no overlap at all. */
@media (max-width: 1024px) {
	.gts {
		display: grid;
		grid-template-columns: auto 1fr auto;
		grid-template-areas:
			"slider slider slider"
			"prev   dots   next";
		align-items: center;
		row-gap: 14px;
	}

	.gts-swiper {
		grid-area: slider;
		min-width: 0;
		max-width: 100%;
	}

	.gts-arrow {
		position: static;
		transform: none;
	}

	.gts-arrow:hover {
		transform: none;
	}

	.gts-arrow--prev {
		grid-area: prev;
	}

	.gts-arrow--next {
		grid-area: next;
	}

	.gts-dots {
		grid-area: dots;
		margin-top: 0;
	}
}
