/* Review Card Slider — front end */
.rcs-slider {
	--rcs-gap: 20px;
	--rcs-lines: 6;
	--rcs-per-view: 4;
	--rcs-card-bg: #ffffff;
	--rcs-text: #1f2a5c;
	--rcs-avatar: #3b4a86;
	--rcs-star: #f2a93b;
	--rcs-quote: #dde3f3;
	--rcs-muted: color-mix(in srgb, var(--rcs-text) 62%, transparent);
	--rcs-arrow-space: 26px;

	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: 0 var(--rcs-arrow-space);
	color: var(--rcs-text);
	font-size: 14px;
	line-height: 1.6;
	-webkit-tap-highlight-color: transparent;
}
.rcs-slider *,
.rcs-slider *::before,
.rcs-slider *::after { box-sizing: border-box; }

/* ---------- Viewport & track ---------- */
.rcs-viewport {
	overflow: hidden;
	/* room for card shadows */
	padding: 12px 0 32px;
	margin: -12px 0 -32px;
	touch-action: pan-y;
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
}
.rcs-viewport.is-dragging { cursor: grabbing; }

.rcs-edge-fade .rcs-viewport {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%);
}

.rcs-track {
	position: relative;
	display: flex;
	gap: var(--rcs-gap);
	will-change: transform;
	transform: translate3d(0, 0, 0);
}

.rcs-slide {
	flex: 0 0 calc((100% - (var(--rcs-per-view) - 1) * var(--rcs-gap)) / var(--rcs-per-view));
	min-width: 0;
	display: flex;
}

/* Before JS runs: show the first cards in a clean row, no jump */
.rcs-slider:not(.is-ready) .rcs-track { overflow: hidden; }

/* ---------- Card ---------- */
.rcs-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 234px;
	padding: 18px 18px 16px;
	background: var(--rcs-card-bg);
	border: 1px solid color-mix(in srgb, var(--rcs-text) 9%, transparent);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(31, 42, 92, .04), 0 6px 18px -6px rgba(31, 42, 92, .12);
	transition: box-shadow .25s ease, transform .25s ease;
}
@media (hover: hover) {
	.rcs-card:hover {
		box-shadow: 0 1px 2px rgba(31, 42, 92, .05), 0 10px 22px -10px rgba(31, 42, 92, .22);
		transform: translateY(-2px);
	}
}

.rcs-card-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	min-height: 24px;
}
.rcs-source { display: inline-flex; align-items: center; min-height: 22px; }
.rcs-source-logo { display: block; height: 20px; width: auto; max-width: 110px; }
.rcs-source-text { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }

.rcs-quote { width: 20px; height: 16px; flex: none; margin-top: 4px; fill: var(--rcs-quote); }

.rcs-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: flex-start; }

.rcs-text {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.65;
	color: var(--rcs-text);
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--rcs-lines);
	line-clamp: var(--rcs-lines);
	overflow: hidden;
}
.rcs-text--short {
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.5;
}

.rcs-more {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 10px 0 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--rcs-text);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	cursor: pointer;
}
.rcs-more[hidden] { display: none; }
.rcs-more svg { width: 13px; height: 13px; }
.rcs-more:hover { text-decoration-thickness: 2px; }

.rcs-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 18px;
}
.rcs-author { display: flex; align-items: center; gap: 10px; min-width: 0; }

.rcs-avatar {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--rcs-avatar);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .02em;
}
.rcs-avatar--img { object-fit: cover; padding: 0; }

.rcs-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rcs-name {
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.rcs-date { font-size: 11.5px; color: var(--rcs-muted); }

/* ---------- Stars (supports half stars) ---------- */
.rcs-stars { display: inline-flex; gap: 2px; flex: none; }
.rcs-star { position: relative; display: block; width: 14px; height: 14px; }
.rcs-star svg { display: block; width: 14px; height: 14px; }
.rcs-star-bg svg { fill: color-mix(in srgb, var(--rcs-star) 22%, #e4e6ee); }
.rcs-star-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; }
.rcs-star-fill svg { fill: var(--rcs-star); }

/* ---------- Arrows ---------- */
.rcs-arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	margin-top: -19px;
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--rcs-text) 10%, transparent);
	border-radius: 50%;
	background: #fff;
	color: var(--rcs-text);
	box-shadow: 0 4px 14px -4px rgba(31, 42, 92, .25);
	cursor: pointer;
	transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.rcs-arrow svg { width: 18px; height: 18px; }
.rcs-arrow:hover { background: var(--rcs-text); color: #fff; }
.rcs-arrow:active { transform: scale(.94); }
.rcs-prev { left: 0; }
.rcs-next { right: 0; }

.rcs-no-arrows { --rcs-arrow-space: 0px; }
.rcs-no-arrows .rcs-arrow,
.rcs-static .rcs-arrow { display: none; }

/* ---------- Dots ---------- */
.rcs-dots {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 22px;
}
.rcs-no-dots .rcs-dots,
.rcs-static .rcs-dots { display: none; }

.rcs-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: color-mix(in srgb, var(--rcs-text) 22%, transparent);
	cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}
.rcs-dot[aria-selected="true"] { width: 22px; background: var(--rcs-text); }

/* ---------- Focus ---------- */
.rcs-slider :focus-visible {
	outline: 2px solid var(--rcs-text);
	outline-offset: 3px;
}

/* ---------- Static mode (not enough cards to loop) ---------- */
.rcs-static .rcs-viewport { cursor: default; }

/* ---------- Popup for full review ---------- */
.rcs-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: grid;
	place-items: center;
	padding: 20px;
	background: rgba(15, 20, 45, .55);
	opacity: 0;
	transition: opacity .2s ease;
}
.rcs-modal.is-open { opacity: 1; }
.rcs-modal-inner {
	position: relative;
	width: min(560px, 100%);
	max-height: calc(100vh - 40px);
	overflow: auto;
	transform: translateY(10px);
	transition: transform .25s ease;
}
.rcs-modal.is-open .rcs-modal-inner { transform: none; }
.rcs-modal .rcs-card { min-height: 0; padding: 26px 24px 22px; transform: none; }
.rcs-modal .rcs-text { -webkit-line-clamp: unset; line-clamp: none; display: block; font-size: 15px; }
.rcs-modal .rcs-more { display: none; }
.rcs-modal-close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: color-mix(in srgb, var(--rcs-text) 8%, #fff);
	color: var(--rcs-text);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.rcs-modal .rcs-quote { margin-right: 40px; }
body.rcs-modal-open { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.rcs-card { min-height: 220px; }
}

@media (max-width: 639px) {
	.rcs-slider { --rcs-arrow-space: 0px; padding-bottom: 66px; }
	.rcs-card { padding: 16px; min-height: 200px; }
	/* Arrows move under the cards and sit either side of the dots */
	.rcs-arrow {
		top: auto;
		bottom: 0;
		margin-top: 0;
		width: 36px;
		height: 36px;
	}
	.rcs-prev { left: 0; }
	.rcs-next { right: 0; }
	.rcs-dots {
		position: absolute;
		left: 48px;
		right: 48px;
		bottom: 0;
		height: 36px;
		margin: 0;
		align-items: center;
	}
	.rcs-static,
	.rcs-no-arrows.rcs-no-dots { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.rcs-card,
	.rcs-dot,
	.rcs-arrow,
	.rcs-modal,
	.rcs-modal-inner { transition: none; }
	.rcs-card:hover { transform: none; }
}

.rcs-empty {
	padding: 14px 16px;
	border: 1px dashed #c3c7d5;
	border-radius: 8px;
	font-size: 14px;
}
