/*
 * TL Reviews: testimonianze in slider.
 * Base a specificità minima; il titolo usa (0,2,1) per battere la tipografia H del Kit
 * (.elementor-kit-N h2, 0,1,1) restando sotto i controlli del widget (0,3,0+).
 */

:where(.tl-reviews) {
	position: relative;
	display: block;
	text-align: center;
	color: var(--e-global-color-primary, #202631);
}

:where(.tl-reviews):focus-visible {
	outline: 2px solid var(--tl-focus, var(--e-global-color-tlgoldink, #84693E));
	outline-offset: 8px;
}

/* ---------- Intestazione ---------- */

:where(.tl-reviews__head) {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: clamp(48px, 5vw + 24px, 96px);
}

:where(.tl-reviews__eyebrow) {
	margin: 0 0 clamp(16px, 1.6vw, 24px);
	color: var(--e-global-color-primary, #202631);
	font-family: var(--tl-font-text);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	text-transform: none;
}

.tl-reviews .tl-reviews__title:is(h1, h2, h3, h4, h5, h6, p, div) {
	margin: 0;
	color: var(--e-global-color-primary, #202631);
	font-family: var(--tl-font-title);
	font-size: clamp(2.125rem, 1.5rem + 2.2vw, 3rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	text-wrap: balance;
}

:where(.tl-reviews__line) {
	display: block;
	width: 1px;
	height: 80px;
	margin-top: clamp(24px, 2.6vw, 36px);
	background-color: var(--e-global-color-primary, #202631);
}

/* ---------- Slide ---------- */

:where(.tl-reviews__slides) {
	display: grid;
}

:where(.tl-reviews__slide) {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: 0;
}

/* Senza JS le slide sono una sotto l'altra; con JS si sovrappongono e cambia l'attiva. */
:where(html:not(.tl-js) .tl-reviews__slide + .tl-reviews__slide) {
	margin-top: 64px;
}

:where(html.tl-js .tl-reviews__slide) {
	grid-area: 1 / 1;
	visibility: hidden;
	opacity: 0;
	transform: translateX(16px);
	transition: opacity .5s var(--tl-ease-std, ease), transform .5s var(--tl-ease-std, ease), visibility 0s linear .5s;
}

:where(html.tl-js .tl-reviews__slide.is-prev) {
	transform: translateX(-16px);
}

:where(html.tl-js .tl-reviews__slide.is-active) {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition-delay: 0s;
}

/* Il testo occupa lo spazio libero: l'autore resta sempre in fondo alla slide e il contatore, allineato a lui, non si sposta. */
:where(.tl-reviews__quote) {
	flex: 1 0 auto;
	max-width: 680px;
	margin: 0;
	color: var(--e-global-color-text, #444);
	font-family: var(--tl-font-text);
	font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
	font-weight: 400;
	line-height: 1.3;
	text-wrap: balance;
}

:where(.tl-reviews__quote > p) {
	margin: 0;
}

:where(.tl-reviews--marks .tl-reviews__quote > p)::before {
	content: "\00AB\00A0";
}

:where(.tl-reviews--marks .tl-reviews__quote > p)::after {
	content: "\00A0\00BB";
}

:where(.tl-reviews__caption) {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-top: clamp(32px, 3vw + 16px, 56px);
}

:where(.tl-reviews__author) {
	color: var(--e-global-color-primary, #202631);
	font-family: var(--tl-font-text);
	font-size: clamp(1rem, .95rem + .25vw, 1.1875rem);
	font-weight: 700;
	line-height: 1.4;
}

:where(.tl-reviews__meta) {
	color: var(--e-global-color-tlmuted, #6E6960);
	font-family: var(--tl-font-text);
	font-size: .875rem;
	line-height: 1.5;
}

/* ---------- Contatore e frecce ---------- */

:where(.tl-reviews__nav) {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}

:where(.tl-reviews__counter) {
	margin: 0;
	font-family: var(--tl-font-text);
	font-size: .875rem;
	font-variant-numeric: tabular-nums;
	line-height: 1.4;
}

:where(.tl-reviews__current) {
	color: var(--e-global-color-primary, #202631);
}

:where(.tl-reviews__of) {
	color: var(--e-global-color-tlgrey, #8A847B);
}

:where(.tl-reviews .tl-arrow) {
	--tl-arrow-size: 40px;
}

/* Da desktop il contatore va al bordo destro, all'altezza dell'autore. */
@media (min-width: 1025px) {
	:where(.tl-reviews__nav) {
		position: absolute;
		right: 0;
		bottom: 0;
		margin-top: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	:where(html.tl-js .tl-reviews__slide) {
		transition: none;
		transform: none;
	}
}
