/**
 * Film View — film-view.css
 * Frontend slider styles. All colors/sizes controlled via CSS variables
 * injected dynamically from plugin settings.
 *
 * @package FilmView
 */

/* ── CSS Variables (defaults — overridden by inline style from PHP) ── */
:root {
	--fv-gold:         #c9a96e;
	--fv-gold-light:   #e8d5b0;
	--fv-cream:        #faf7f2;
	--fv-dark:         #1a1410;
	--fv-slide-w:      260px;
	--fv-slide-h:      370px;
	--fv-active-scale: 1.25;
	--fv-gap:          20px;
	--fv-radius:       4px;
	--fv-heading-size: 2.2rem;
	--fv-heading-color:#1a1410;
	--fv-heading-font: 'Cormorant Garamond';
	--fv-sub-size:     0.6rem;
	--fv-sub-color:    #c9a96e;
	--fv-sub-font:     'Montserrat';
}

/* ── Container ─────────────────────────────── */
.fv-container {
	width: 100%;
	background: var(--fv-cream);
	padding: 40px 0 20px;
	overflow: hidden;
	box-sizing: border-box;
}

/* ── Header ────────────────────────────────── */
.fv-header {
	text-align: center;
	margin-bottom: 36px;
}

.fv-heading {
	font-family: var(--fv-heading-font), Georgia, serif;
	font-weight: 300;
	font-size: var(--fv-heading-size);
	color: var(--fv-heading-color);
	letter-spacing: 0.1em;
	margin: 0;
	line-height: 1.2;
}

.fv-sub {
	font-family: var(--fv-sub-font), Arial, sans-serif;
	font-size: var(--fv-sub-size);
	letter-spacing: 0.35em;
	text-transform: uppercase;
	color: var(--fv-sub-color);
	margin: 6px 0 0;
}

.fv-divider {
	width: 60px;
	height: 1px;
	background: var(--fv-gold);
	margin: 12px auto 0;
}

/* ── Wrapper ────────────────────────────────── */
.fv-wrapper {
	position: relative;
	padding-bottom: 50px;
}

.fv-track-outer {
	overflow: hidden;
	width: 100%;
	/* Height = tallest possible card + padding. Prevents page reflow. */
	height: calc( var(--fv-slide-h) * var(--fv-active-scale) + 60px );
	display: flex;
	align-items: center;
}

/* ── Track ─────────────────────────────────── */
.fv-track {
	display: flex;
	align-items: center;
	gap: var(--fv-gap);
	padding: 0 40px;
	will-change: transform;
}

/* ── Slides ─────────────────────────────────── */
.fv-slide {
	flex: 0 0 var(--fv-slide-w);
	height: var(--fv-slide-h);
	border-radius: var(--fv-radius);
	overflow: hidden;
	position: relative;
	cursor: pointer;
	background: #111;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	/* Scale approach = zero layout reflow = no glitch */
	transform: scale(1);
	transform-origin: center center;
	transition:
		transform  0.55s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow 0.55s cubic-bezier(0.4, 0, 0.2, 1),
		opacity    0.55s cubic-bezier(0.4, 0, 0.2, 1),
		filter     0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.fv-slide.fv-active {
	transform: scale( var(--fv-active-scale) );
	box-shadow: 0 0 0 3px var(--fv-gold), 0 20px 60px rgba(0, 0, 0, 0.35);
	z-index: 10;
}

.fv-slide.fv-side {
	opacity: 0.72;
	filter: brightness(0.78);
}

/* ── MP4 video ──────────────────────────────── */
.fv-slide video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── YouTube / Vimeo thumbnail ──────────────── */
.fv-thumb-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-color: #222;
	transition: opacity 0.4s ease;
	z-index: 1;
}
.fv-slide.fv-active .fv-thumb-bg {
	opacity: 0;
	pointer-events: none;
}

/* ── iFrame (YouTube / Vimeo) ───────────────── */
.fv-yt-iframe,
.fv-vimeo-iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
	z-index: 2;
}
.fv-slide.fv-active .fv-yt-iframe,
.fv-slide.fv-active .fv-vimeo-iframe {
	opacity: 1;
	pointer-events: auto;
}

/* ── Gold corner decorations ────────────────── */
.fv-slide.fv-active::before,
.fv-slide.fv-active::after {
	content: '';
	position: absolute;
	width: 24px;
	height: 24px;
	z-index: 20;
	pointer-events: none;
}
.fv-slide.fv-active::before {
	top: 8px;
	left: 8px;
	border-top: 2px solid var(--fv-gold-light);
	border-left: 2px solid var(--fv-gold-light);
}
.fv-slide.fv-active::after {
	bottom: 8px;
	right: 8px;
	border-bottom: 2px solid var(--fv-gold-light);
	border-right: 2px solid var(--fv-gold-light);
}

/* ── Overlay (paused state) ─────────────────── */
.fv-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 8, 5, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.4s ease;
	z-index: 5;
}
.fv-slide.fv-active .fv-overlay {
	opacity: 0;
	pointer-events: none;
}
.fv-play-icon {
	width: 52px;
	height: 52px;
	border: 2px solid rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ── Now Playing ────────────────────────────── */
.fv-now-playing {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 30;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 0.48rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--fv-gold-light);
	background: rgba(0, 0, 0, 0.5);
	padding: 4px 8px;
	border-radius: 2px;
	display: none;
}
.fv-slide.fv-active .fv-now-playing {
	display: block;
}

/* ── Mute button (MP4 only) ─────────────────── */
.fv-mute-btn {
	position: absolute;
	bottom: 14px;
	right: 14px;
	z-index: 30;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.2s ease;
}
.fv-mute-btn:hover { background: rgba(0, 0, 0, 0.75); }
.fv-mute-btn:focus-visible { outline: 2px solid var(--fv-gold); }
.fv-slide.fv-active .fv-mute-btn { display: flex; }

/* ── Navigation arrows ──────────────────────── */
.fv-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 20;
	background: rgba(255, 255, 255, 0.92);
	border: none;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	transition: background 0.2s, box-shadow 0.2s;
	color: var(--fv-dark);
	padding: 0;
}
.fv-arrow:hover { background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22); }
.fv-arrow:focus-visible { outline: 2px solid var(--fv-gold); outline-offset: 2px; }
.fv-prev { left: 8px; }
.fv-next { right: 8px; }
.fv-arrow svg { width: 16px; height: 16px; }

/* ── Dot indicators ─────────────────────────── */
.fv-dots {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 16px;
}
.fv-dot {
	width: 24px;
	height: 2px;
	background: var(--fv-gold-light);
	cursor: pointer;
	transition: background 0.3s, width 0.3s;
	border-radius: 2px;
	border: none;
	padding: 0;
}
.fv-dot:focus-visible { outline: 2px solid var(--fv-gold); outline-offset: 3px; }
.fv-dot.fv-dot-active { background: var(--fv-gold); width: 40px; }

/* ── Unmute prompt ──────────────────────────── */
.fv-unmute-prompt {
	position: absolute;
	bottom: 54px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 40;
	background: rgba(0, 0, 0, 0.75);
	color: #fff;
	padding: 8px 16px;
	border-radius: 20px;
	font-family: 'Montserrat', Arial, sans-serif;
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	cursor: pointer;
	white-space: nowrap;
	border: 1px solid rgba(255,255,255,0.2);
	transition: background 0.2s, transform 0.2s;
	display: none;
	align-items: center;
	gap: 6px;
	animation: fv-pulse 2s infinite;
}
.fv-unmute-prompt:hover {
	background: rgba(201, 169, 110, 0.9);
	transform: translateX(-50%) scale(1.05);
}
@keyframes fv-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(201,169,110,0.4); }
	50%       { box-shadow: 0 0 0 8px rgba(201,169,110,0); }
}
