/* SAC Review Slider: cards in a scroll-snapping track; slider.js adds the arrows, dots and autoplay. */
.sac-reviews {
	--sac-reviews-gap: 20px;
	--sac-reviews-bg: #f5f5f5;
	--sac-reviews-border: #eee;
	--sac-reviews-text: #555;
	--sac-reviews-star: #43b02a;
	--sac-reviews-control: #bbb;
	--sac-reviews-control-active: #333;
	position: relative;
	padding: 0 34px;
	color: var(--sac-reviews-text);
	font-family: "Open Sans", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.sac-reviews__track {
	display: flex;
	gap: var(--sac-reviews-gap);
	align-items: flex-start;
	margin: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
	transition: height 0.3s ease;
}
.sac-reviews__track::-webkit-scrollbar { display: none; }
.sac-reviews__track:focus-visible { outline: 2px solid var(--sac-reviews-control-active); outline-offset: 4px; }

.sac-reviews__card {
	position: relative;
	flex: 0 0 calc((100% - (var(--sac-reviews-per-slide) - 1) * var(--sac-reviews-gap)) / var(--sac-reviews-per-slide));
	box-sizing: border-box;
	margin: 0;
	padding: 15px 20px 12px;
	background: var(--sac-reviews-bg);
	border: 1px solid var(--sac-reviews-border);
	scroll-snap-align: start;
	list-style: none;
}
/* The theme styles every list item (font, color, line height); cards follow the slider instead. */
.sac-reviews .sac-reviews__card,
.sac-reviews .sac-reviews__card p {
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}
.sac-reviews__card::before { content: none; }

.sac-reviews__head { margin-bottom: 12px; padding-right: 44px; }

.sac-reviews__name { font-size: 16px; font-weight: 700; }

.sac-reviews__stars { display: flex; gap: 1px; margin: 1px 0; }
.sac-reviews__star {
	width: 18px;
	height: 18px;
	background: var(--sac-reviews-star);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.6l-6.4 3.5L7 14l-5.3-5 7.2-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.6l-6.4 3.5L7 14l-5.3-5 7.2-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sac-reviews__date { font-style: italic; }

.sac-reviews__source { position: absolute; top: 6px; right: 6px; line-height: 0; }
.sac-reviews__source img { width: 39px; height: 32px; }

.sac-reviews__text { margin: 0; }
.sac-reviews .sac-reviews__title { color: inherit; font-family: inherit; font-weight: 600; }

/* Controls appear once slider.js runs and there is more than one slide. */
.sac-reviews__arrow,
.sac-reviews__dots { display: none; }
.sac-reviews.is-ready.has-slides .sac-reviews__arrow { display: block; }
.sac-reviews.is-ready.has-slides .sac-reviews__dots { display: flex; }

/* A fixed height beside the reviewer's name: the track's height follows the cards on show, so centring on it would
   move the arrows with every slide. */
.sac-reviews__arrow {
	position: absolute;
	top: 36px;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--sac-reviews-control);
	cursor: pointer;
}
.sac-reviews__arrow::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
}
.sac-reviews__arrow--prev { left: 0; }
.sac-reviews__arrow--prev::after { transform: translate(-30%, -50%) rotate(135deg); }
.sac-reviews__arrow--next { right: 0; }
.sac-reviews__arrow--next::after { transform: translate(-70%, -50%) rotate(-45deg); }
.sac-reviews__arrow:hover,
.sac-reviews__arrow:focus-visible { background: var(--sac-reviews-control-active); }

.sac-reviews__dots { justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 28px; margin-top: 30px; }
.sac-reviews__dots button {
	width: 16px;
	height: 16px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}
.sac-reviews__dots button::before {
	content: "";
	display: block;
	width: 6px;
	height: 6px;
	margin: auto;
	border-radius: 50%;
	background: var(--sac-reviews-control);
}
.sac-reviews__dots button[aria-current="true"]::before { background: var(--sac-reviews-control-active); }
.sac-reviews__count { font-size: 14px; }

@media (max-width: 1023px) {
	.sac-reviews { --sac-reviews-per-slide: 2 !important; }
}
@media (max-width: 767px) {
	.sac-reviews { --sac-reviews-per-slide: 1 !important; padding: 0 30px; }
	.sac-reviews__dots { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
	.sac-reviews__track { scroll-behavior: auto; transition: none; }
}
