/* FPO Video Carousel for Elementor */

.fpo-vcar {
	--fpo-spv: 3;
	--fpo-gap: 20px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

.fpo-vcar *,
.fpo-vcar *::before,
.fpo-vcar *::after {
	box-sizing: border-box;
}

.fpo-vcar__stage {
	position: relative;
}

/* ---------- Pista ---------- */
.fpo-vcar__track {
	position: relative;
	display: flex;
	gap: var(--fpo-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	outline: none;
}

.fpo-vcar__track::-webkit-scrollbar {
	display: none;
}

.fpo-vcar__track:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.fpo-vcar__slide {
	flex: 0 0 calc((100% - (var(--fpo-spv) - 1) * var(--fpo-gap)) / var(--fpo-spv));
	min-width: 0;
	scroll-snap-align: start;
}

/* ---------- Video ---------- */
.fpo-vcar__media {
	position: relative;
	width: 100%;
	aspect-ratio: 9 / 16;
	overflow: hidden;
	background-color: #000;
	isolation: isolate;
}

.fpo-vcar .fpo-vcar__video,
.fpo-vcar .fpo-vcar__poster,
.fpo-vcar .fpo-vcar__iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	display: block;
	border: 0;
	border-radius: 0;
	object-fit: cover;
	background: #000;
}

.fpo-vcar .fpo-vcar__iframe {
	z-index: 5;
}

.fpo-vcar__shade,
.fpo-vcar__gradient {
	position: absolute;
	left: 0;
	right: 0;
	pointer-events: none;
	z-index: 1;
	transition: opacity .3s ease;
}

.fpo-vcar__shade {
	top: 0;
	bottom: 0;
}

.fpo-vcar__gradient {
	bottom: 0;
	height: 45%;
	background: linear-gradient(to top, var(--fpo-grad, rgba(0, 0, 0, .75)), transparent);
}

/* Logo y textos: no bloquean los controles nativos del video */
.fpo-vcar .fpo-vcar__logo {
	position: absolute;
	top: 19%;
	left: 50%;
	transform: translateX(-50%);
	width: 24%;
	height: auto;
	max-width: none;
	z-index: 2;
	pointer-events: none;
	transition: opacity .3s ease;
}

.fpo-vcar__text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 19%;
	z-index: 2;
	padding: 0 16px;
	text-align: center;
	pointer-events: none;
	transition: opacity .3s ease;
}

.fpo-vcar .fpo-vcar__label,
.fpo-vcar .fpo-vcar__name,
.fpo-vcar .fpo-vcar__detail {
	margin-top: 0;
	padding: 0;
	color: #fff;
	text-transform: uppercase;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.fpo-vcar .fpo-vcar__label  { font-size: 9px;  font-weight: 700; letter-spacing: .5px; margin-bottom: 2px; }
.fpo-vcar .fpo-vcar__name   { font-size: 12px; font-weight: 300; letter-spacing: .3px; margin-bottom: 3px; }
.fpo-vcar .fpo-vcar__detail { font-size: 6px;  font-weight: 700; letter-spacing: 1px;  margin-bottom: 0; }

/* Estado reproduciendo */
.fpo-vcar-hidetext-yes .fpo-vcar__media.is-playing .fpo-vcar__text,
.fpo-vcar-hidetext-yes .fpo-vcar__media.is-playing .fpo-vcar__gradient,
.fpo-vcar-hidelogo-yes .fpo-vcar__media.is-playing .fpo-vcar__logo {
	opacity: 0;
}

.fpo-vcar__media.is-playing .fpo-vcar__play,
.fpo-vcar__media.is-playing .fpo-vcar__shade {
	opacity: 0;
	pointer-events: none;
}

/* ---------- Botón play ---------- */
.fpo-vcar .fpo-vcar__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	transform: translate(-50%, -50%);
	width: 64px;
	height: 64px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(255, 255, 255, .35);
	color: #fff;
	box-shadow: none;
	cursor: pointer;
	line-height: 1;
	transition: transform .25s ease, background-color .25s ease, color .25s ease, opacity .25s ease;
	-webkit-tap-highlight-color: transparent;
}

.fpo-vcar .fpo-vcar__play svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
	margin-left: 8%;
	display: block;
}

.fpo-vcar .fpo-vcar__media:hover .fpo-vcar__play {
	transform: translate(-50%, -50%) scale(1.07);
}

.fpo-vcar .fpo-vcar__play:focus { outline: none; }
.fpo-vcar .fpo-vcar__play:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- Flechas ---------- */
.fpo-vcar .fpo-vcar__arrow {
	position: absolute;
	top: 50%;
	z-index: 10;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background-color: transparent;
	color: #000;
	fill: #000;
	font-size: 16px;
	line-height: 1;
	box-shadow: none;
	cursor: pointer;
	transition: color .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.fpo-vcar .fpo-vcar__arrow--prev { left: -56px; }
.fpo-vcar .fpo-vcar__arrow--next { right: -56px; }

.fpo-vcar .fpo-vcar__arrow svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
	display: block;
}

.fpo-vcar .fpo-vcar__arrow i {
	font-size: inherit;
	line-height: 1;
}

.fpo-vcar .fpo-vcar__arrow:disabled {
	opacity: .3;
	cursor: default;
}

.fpo-vcar .fpo-vcar__arrow:focus { outline: none; }
.fpo-vcar .fpo-vcar__arrow:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- Puntos ---------- */
.fpo-vcar__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
}

.fpo-vcar .fpo-vcar__dot {
	width: 8px;
	height: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 20px;
	background-color: #ccc;
	box-shadow: none;
	cursor: pointer;
	transition: width .3s ease, background-color .2s ease;
}

.fpo-vcar .fpo-vcar__dot.is-active {
	width: 24px;
	background-color: #000;
}

.fpo-vcar .fpo-vcar__dot:focus { outline: none; }
.fpo-vcar .fpo-vcar__dot:focus-visible { outline: 2px solid #000; outline-offset: 2px; }

/* Sin desbordamiento: no hacen falta flechas ni puntos */
.fpo-vcar.is-static .fpo-vcar__arrow,
.fpo-vcar.is-static .fpo-vcar__dots {
	display: none !important;
}

@media (prefers-reduced-motion: reduce) {
	.fpo-vcar__track { scroll-behavior: auto; }
	.fpo-vcar .fpo-vcar__play,
	.fpo-vcar .fpo-vcar__arrow,
	.fpo-vcar .fpo-vcar__dot { transition: none; }
}
