/* OAO Meta Comments Slider
 * Styled to match the Endorsal Testimonial Carousel and Video Slider.
 * Change the look by overriding these variables in your theme's CSS, e.g.
 * .oao-mcs { --mcs-accent: #e4572e; --mcs-height: 320px; }
 */
.oao-mcs {
	--mcs-n: 3;
	--mcs-gap: 24px;
	--mcs-accent: #1f6feb;
	--mcs-card-bg: #ffffff;
	--mcs-card-border: #e5e7eb;
	--mcs-text: #1f2937;
	--mcs-muted: #6b7280;
	--mcs-radius: 12px;
	--mcs-speed: 600ms;
	--mcs-height: 280px; /* every card is exactly this tall; longer comments are cut off with "See full comment" */

	position: relative;
	width: 100%;
	margin: 0 auto;
	color: var(--mcs-text);
}

/* Selectors are prefixed with .oao-mcs (and key rules use !important)
 * so WordPress theme styles for buttons, figures, etc. can't leak in. */
.oao-mcs .oao-mcs-viewport {
	overflow: hidden;
	padding: 4px; /* room for card shadow */
	margin: -4px;
	box-sizing: border-box;
}

.oao-mcs .oao-mcs-track {
	display: flex;
	align-items: flex-start;
	gap: var(--mcs-gap);
	margin: 0;
	padding: 0;
	transition: transform var(--mcs-speed) ease;
	will-change: transform;
}

.oao-mcs .oao-mcs-card {
	flex: 0 0 calc((100% - (var(--mcs-n) - 1) * var(--mcs-gap)) / var(--mcs-n));
	min-width: 0;
	box-sizing: border-box;
	height: var(--mcs-height) !important; /* fixed: the slider never changes height */
	min-height: 0 !important;
	overflow: hidden;
	margin: 0 !important;
	padding: 16px !important;
	display: flex;
	flex-direction: column;
	justify-content: center; /* short comments sit in the middle of the card */
	background: var(--mcs-card-bg);
	border: 1px solid var(--mcs-card-border);
	border-radius: var(--mcs-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: opacity var(--mcs-speed) ease;
}
.oao-mcs .oao-mcs-card[aria-hidden="true"] { opacity: 0.35; }
.oao-mcs .oao-mcs-card::before,
.oao-mcs .oao-mcs-card::after { content: none !important; display: none !important; }

/* The whole screenshot is a button that opens the larger view. */
.oao-mcs .oao-mcs-card button.oao-mcs-open {
	all: unset;
	display: flex !important;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	cursor: zoom-in;
	border-radius: calc(var(--mcs-radius) - 4px);
}
.oao-mcs .oao-mcs-card button.oao-mcs-open:focus-visible { outline: 2px solid var(--mcs-accent) !important; outline-offset: 4px; }

.oao-mcs .oao-mcs-shot {
	position: relative;
	display: block;
	/* Card height minus its padding (32px) and room for the "See full comment" link (34px). */
	max-height: calc(var(--mcs-height) - 66px);
	overflow: hidden;
}
.oao-mcs .oao-mcs-shot img {
	display: block !important;
	width: 100% !important;
	height: auto !important;
	max-width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}
/* Fade out the bottom of comments that are cut off. */
.oao-mcs .is-clipped .oao-mcs-shot::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 64px;
	background: linear-gradient(rgba(255, 255, 255, 0), var(--mcs-card-bg));
}

.oao-mcs .oao-mcs-more {
	display: none;
	align-self: flex-start;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--mcs-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.oao-mcs .is-clipped .oao-mcs-more { display: inline; }
.oao-mcs button.oao-mcs-open:hover .oao-mcs-more { text-decoration-thickness: 2px; }

/* Controls: ‹ dots › centered below (same as the testimonial carousel) */
.oao-mcs .oao-mcs-controls {
	display: flex; align-items: center; justify-content: center; gap: 16px;
	margin: 20px 0 0 !important;
	padding: 0 !important;
}
.oao-mcs .oao-mcs-controls button,
.oao-mcs .oao-mcs-lightbox button {
	all: unset;
	box-sizing: border-box !important;
	display: inline-flex !important;
	align-items: center; justify-content: center;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.oao-mcs .oao-mcs-controls button::before,
.oao-mcs .oao-mcs-controls button::after { content: none !important; display: none !important; }
.oao-mcs .oao-mcs-controls .oao-mcs-prev,
.oao-mcs .oao-mcs-controls .oao-mcs-next {
	width: 40px !important; height: 40px !important;
	min-width: 0 !important; min-height: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--mcs-card-border) !important;
	border-radius: 50% !important;
	background: var(--mcs-card-bg) !important;
	color: var(--mcs-text) !important;
	font-size: 22px !important; line-height: 1 !important;
	box-shadow: none !important;
}
.oao-mcs .oao-mcs-controls .oao-mcs-prev:hover,
.oao-mcs .oao-mcs-controls .oao-mcs-next:hover {
	border-color: var(--mcs-accent) !important;
	color: var(--mcs-accent) !important;
}
.oao-mcs .oao-mcs-dots { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; max-width: 70%; }
.oao-mcs .oao-mcs-controls .oao-mcs-dot {
	width: 10px !important; height: 10px !important;
	min-width: 0 !important; min-height: 0 !important;
	padding: 0 !important; margin: 0 !important;
	border: 0 !important; border-radius: 50% !important;
	background: #d1d5db !important;
	box-shadow: none !important;
	font-size: 0 !important;
}
.oao-mcs .oao-mcs-controls .oao-mcs-dot[aria-selected="true"] { background: var(--mcs-accent) !important; }
.oao-mcs .oao-mcs-controls button:focus-visible,
.oao-mcs .oao-mcs-lightbox button:focus-visible { outline: 2px solid var(--mcs-accent) !important; outline-offset: 2px; }

.oao-mcs.oao-mcs-single-page .oao-mcs-controls { display: none; }

/* Larger view */
.oao-mcs .oao-mcs-lightbox {
	box-sizing: border-box;
	width: min(900px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	padding: 48px 56px 24px;
	border: 0;
	border-radius: var(--mcs-radius);
	background: var(--mcs-card-bg);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	overflow: auto;
}
.oao-mcs .oao-mcs-lightbox::backdrop { background: rgba(17, 24, 39, 0.7); }
.oao-mcs .oao-mcs-lightbox:not([open]) { display: none; }
.oao-mcs .oao-mcs-lb-img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
}
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-close {
	position: absolute; top: 8px; right: 8px;
	width: 40px; height: 40px;
	font-size: 28px; line-height: 1;
	color: var(--mcs-muted);
	border-radius: 50%;
}
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-prev,
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-next {
	position: absolute; top: 50%;
	transform: translateY(-50%);
	width: 40px; height: 40px;
	border: 1px solid var(--mcs-card-border);
	border-radius: 50%;
	background: var(--mcs-card-bg);
	color: var(--mcs-text);
	font-size: 22px; line-height: 1;
}
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-prev { left: 8px; }
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-next { right: 8px; }
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-close:hover,
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-prev:hover,
.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-next:hover { color: var(--mcs-accent); border-color: var(--mcs-accent); }

@media (max-width: 600px) {
	.oao-mcs .oao-mcs-lightbox { padding: 48px 16px 64px; }
	.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-prev,
	.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-next { top: auto; bottom: 12px; transform: none; }
	.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-prev { left: calc(50% - 52px); }
	.oao-mcs .oao-mcs-lightbox .oao-mcs-lb-next { right: calc(50% - 52px); }
}

@media (prefers-reduced-motion: reduce) {
	.oao-mcs .oao-mcs-track, .oao-mcs .oao-mcs-card { transition: none; }
}
