/*
 * Testimonial Carousel.
 *
 * Native scroll snapping does the work. That gives correct touch momentum, correct
 * right to left behaviour and keyboard scrolling with no JavaScript, and it means the
 * quotations are readable even if the script never loads.
 */
.fba-tc { display: flex; flex-direction: column; gap: var(--fba-space-4); }

.fba-tc__track {
	display: flex;
	gap: var(--fba-tc-gap, 20px);
	margin: 0;
	padding: 4px;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	/* Hide the bar without removing the ability to scroll. */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.fba-tc__track::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
	.fba-tc__track { scroll-behavior: auto; }
}

.fba-tc__slide {
	flex: 0 0 calc(
		( 100% - ( var(--fba-tc-gap, 20px) * ( var(--fba-tc-per-view, 3) - 1 ) ) ) / var(--fba-tc-per-view, 3)
	);
	scroll-snap-align: start;
	min-width: 0;
}

.fba-tc__card {
	display: flex;
	flex-direction: column;
	gap: var(--fba-space-3);
	height: 100%;
	margin: 0;
	padding: var(--fba-space-5);
	border-radius: var(--fba-tc-radius, var(--fba-radius-lg));
	background: var(--fba-tc-card-bg, var(--fba-color-surface));
}

.fba-tc--card .fba-tc__card    { box-shadow: var(--fba-shadow-md); }
.fba-tc--outline .fba-tc__card { border: 1px solid var(--fba-color-border); background: transparent; }
.fba-tc--plain .fba-tc__card   { padding: 0; background: transparent; }

.fba-tc__rating { display: flex; gap: 2px; --fba-icon-size: 18px; color: var(--fba-color-border); }
.fba-tc__star.is-filled { color: var(--fba-tc-star-color, #f3a712); }
.fba-tc__star.is-filled .fba-icon { fill: currentColor; }

.fba-tc__quote { margin: 0; color: var(--fba-tc-quote-color, var(--fba-color-text)); line-height: var(--fba-line-body); }
.fba-tc__quote p { margin: 0; }

.fba-tc__meta { display: flex; align-items: center; gap: var(--fba-space-3); margin: auto 0 0; padding-top: var(--fba-space-2); }

.fba-tc__avatar { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; flex: 0 0 auto; }

.fba-tc__who { display: flex; flex-direction: column; min-width: 0; }
.fba-tc__name { font-weight: 600; color: var(--fba-tc-name-color, var(--fba-color-heading)); }
.fba-tc__role { font-size: 0.875rem; color: var(--fba-color-muted); }

.fba-tc__controls { display: flex; align-items: center; justify-content: space-between; gap: var(--fba-space-3); flex-wrap: wrap; }
.fba-tc__controls:empty { display: none; }

.fba-tc__dots { display: flex; align-items: center; gap: 2px; }

/*
 * The dot people see is small, but the thing they have to hit is not.
 *
 * WCAG 2.2 asks for a target of at least 24 by 24 CSS pixels. A 9px dot fails that, so
 * the button itself is 24px square and transparent, and the visible dot is drawn inside
 * it with a pseudo element. The design is unchanged and the target is four times larger.
 */
.fba-tc__dot {
	position: relative;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.fba-tc__dot::before {
	content: "";
	display: block;
	width: 9px;
	height: 9px;
	border-radius: 999px;
	background: var(--fba-color-border);
	transition: background-color var(--fba-motion-fast) var(--fba-ease), width var(--fba-motion-fast) var(--fba-ease);
}

.fba-tc__dot[aria-selected="true"]::before {
	width: 20px;
	background: var(--fba-tc-accent, var(--fba-color-accent));
}

@media (prefers-reduced-motion: reduce) {
	.fba-tc__dot::before { transition: none; }
}

.fba-tc__arrows { display: flex; gap: var(--fba-space-2); margin-inline-start: auto; }

.fba-tc__arrow,
.fba-tc__pause {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	min-width: 36px;
	padding: 0 10px;
	border: 1px solid var(--fba-color-border);
	border-radius: var(--fba-radius-sm);
	background: transparent;
	color: var(--fba-tc-accent, var(--fba-color-accent));
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
	--fba-icon-size: 18px;
}

.fba-tc__arrow[disabled] { opacity: 0.4; cursor: default; }

@media (max-width: 1024px) { .fba-tc { --fba-tc-per-view: 2; } }
@media (max-width: 767px)  { .fba-tc { --fba-tc-per-view: 1; } }

[dir="rtl"] .fba-tc__arrow .fba-icon { transform: scaleX(-1); }
