/* Endorsal Video Slider
 * Styled to match the Endorsal Testimonial Carousel.
 * Change the look by overriding these variables in your theme's CSS, e.g.
 * .oao-evs { --evs-accent: #e4572e; }
 */
.oao-evs {
	--evs-n: 3;
	--evs-gap: 24px;
	--evs-accent: #1f6feb;
	--evs-card-bg: #ffffff;
	--evs-card-border: #e5e7eb;
	--evs-text: #1f2937;
	--evs-muted: #6b7280;
	--evs-radius: 12px;
	--evs-speed: 600ms;

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

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

.oao-evs .oao-evs-track {
	display: flex;
	align-items: stretch; /* cards in a row line up */
	gap: var(--evs-gap);
	margin: 0;
	padding: 0;
	transition: transform var(--evs-speed) ease;
	will-change: transform;
}

.oao-evs .oao-evs-card {
	flex: 0 0 calc((100% - (var(--evs-n) - 1) * var(--evs-gap)) / var(--evs-n));
	min-width: 0;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 16px !important;
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: var(--evs-card-bg);
	border: 1px solid var(--evs-card-border);
	border-radius: var(--evs-radius);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	transition: opacity var(--evs-speed) ease;
}
.oao-evs .oao-evs-card[aria-hidden="true"] { opacity: 0.35; }
.oao-evs .oao-evs-card::before,
.oao-evs .oao-evs-card::after { content: none !important; display: none !important; }

/* Video area */
.oao-evs .oao-evs-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: calc(var(--evs-radius) - 4px);
	overflow: hidden;
}
.oao-evs .oao-evs-frame video,
.oao-evs .oao-evs-frame iframe,
.oao-evs .oao-evs-frame .oao-evs-play,
.oao-evs .oao-evs-frame .oao-evs-play img {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	object-fit: cover;
}
.oao-evs .oao-evs-frame video { object-fit: contain; }

.oao-evs .oao-evs-frame button.oao-evs-play {
	all: unset;
	position: absolute !important;
	inset: 0;
	display: block !important;
	background: #000 !important;
	cursor: pointer;
}
.oao-evs .oao-evs-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	transition: background 0.2s, transform 0.2s;
}
.oao-evs .oao-evs-play-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	transform: translate(-50%, -50%);
	border-style: solid;
	border-width: 12px 0 12px 20px;
	border-color: transparent transparent transparent #fff;
}
.oao-evs .oao-evs-play:hover .oao-evs-play-icon,
.oao-evs .oao-evs-play:focus-visible .oao-evs-play-icon {
	background: var(--evs-accent);
	transform: translate(-50%, -50%) scale(1.06);
}
.oao-evs .oao-evs-play:focus-visible { outline: 2px solid var(--evs-accent) !important; outline-offset: 2px; }

/* Author line (same as the testimonial carousel) */
.oao-evs .oao-evs-author { display: flex; align-items: center; gap: 12px; margin: 0; padding: 0 4px 4px; }
.oao-evs .oao-evs-avatar {
	width: 48px !important; height: 48px !important; flex: 0 0 48px;
	margin: 0; padding: 0; border: 0;
	border-radius: 50%;
	object-fit: cover;
}
.oao-evs .oao-evs-initial {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--evs-accent); color: #fff; font-weight: 600; font-size: 20px; line-height: 1;
}
.oao-evs .oao-evs-meta { display: flex; flex-direction: column; min-width: 0; }
.oao-evs .oao-evs-name { font-size: 15px; }
.oao-evs .oao-evs-sub { font-size: 13px; color: var(--evs-muted); }

/* Controls: ‹ dots › centered below */
.oao-evs .oao-evs-controls {
	display: flex; align-items: center; justify-content: center; gap: 16px;
	margin: 20px 0 0 !important;
	padding: 0 !important;
}
.oao-evs .oao-evs-controls 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-evs .oao-evs-controls button::before,
.oao-evs .oao-evs-controls button::after { content: none !important; display: none !important; }
.oao-evs .oao-evs-controls .oao-evs-prev,
.oao-evs .oao-evs-controls .oao-evs-next {
	width: 40px !important; height: 40px !important;
	min-width: 0 !important; min-height: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--evs-card-border) !important;
	border-radius: 50% !important;
	background: var(--evs-card-bg) !important;
	color: var(--evs-text) !important;
	font-size: 22px !important; line-height: 1 !important;
	box-shadow: none !important;
}
.oao-evs .oao-evs-controls .oao-evs-prev:hover,
.oao-evs .oao-evs-controls .oao-evs-next:hover {
	border-color: var(--evs-accent) !important;
	color: var(--evs-accent) !important;
}
.oao-evs .oao-evs-dots { display: flex; align-items: center; gap: 8px; }
.oao-evs .oao-evs-controls .oao-evs-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-evs .oao-evs-controls .oao-evs-dot[aria-selected="true"] { background: var(--evs-accent) !important; }
.oao-evs .oao-evs-controls button:focus-visible { outline: 2px solid var(--evs-accent) !important; outline-offset: 2px; }

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

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