/* ========================================
   Video Carousel for Elementor - Styles
   ======================================== */

/* ── Theme-aware variables ── */
.jvc-carousel {
	--jvc-bg: var(--rwa-body-bg, #0a0a0a);
	--jvc-text: var(--rwa-text, #cccccc);
	--jvc-heading: var(--rwa-headings, #ffffff);
	--jvc-accent: var(--rwa-accent, #E53935);
	--jvc-primary: var(--rwa-primary, #ff6b35);
	--jvc-card-bg: var(--rwa-sidebar-bg, #111122);
	--jvc-border: rgba(255,255,255,0.08);
	--jvc-muted: rgba(255,255,255,0.5);
	--jvc-btn-bg: rgba(255,255,255,0.08);
	--jvc-btn-border: rgba(255,255,255,0.15);
	--jvc-card-shadow: rgba(0,0,0,0.5);
	--jvc-font: var(--rwa-font-primary, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
}

/* Light mode overrides */
body.rwa-light-mode .jvc-carousel {
	--jvc-border: rgba(0,0,0,0.1);
	--jvc-muted: rgba(0,0,0,0.45);
	--jvc-btn-bg: rgba(0,0,0,0.06);
	--jvc-btn-border: rgba(0,0,0,0.12);
	--jvc-card-shadow: rgba(0,0,0,0.15);
}

.jvc-carousel {
	position: relative;
	padding: 40px 0;
	background: var(--jvc-bg);
	font-family: var(--jvc-font);
	overflow: hidden;
}

/* ── Header ── */
.jvc-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 40px 30px;
}

.jvc-header-left {
	display: flex;
	align-items: center;
	gap: 15px;
}

.jvc-header-icon {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 3px;
	width: 50px;
	height: 50px;
	background: var(--jvc-accent);
	border-radius: 12px;
	padding: 10px 8px;
	flex-shrink: 0;
	overflow: hidden;
}

.jvc-header-icon i,
.jvc-header-icon svg {
	display: none;
}

/* ── Equalizer bars ── */
.jvc-eq-bar {
	width: 4px;
	background: #fff;
	border-radius: 2px;
	animation: jvcEq 1.2s ease-in-out infinite;
}

.jvc-eq-bar:nth-child(1) { height: 60%; animation-delay: 0s; }
.jvc-eq-bar:nth-child(2) { height: 40%; animation-delay: 0.15s; }
.jvc-eq-bar:nth-child(3) { height: 80%; animation-delay: 0.3s; }
.jvc-eq-bar:nth-child(4) { height: 50%; animation-delay: 0.45s; }
.jvc-eq-bar:nth-child(5) { height: 70%; animation-delay: 0.6s; }

@keyframes jvcEq {
	0%, 100% { height: 20%; }
	25%      { height: 80%; }
	50%      { height: 40%; }
	75%      { height: 95%; }
}

.jvc-header-text {
	display: flex;
	flex-direction: column;
}

.jvc-header-subtitle {
	font-size: 13px;
	color: var(--jvc-muted);
	letter-spacing: 0.5px;
}

.jvc-header-title {
	font-size: 1.8rem;
	font-weight: 800;
	color: var(--jvc-heading);
	margin: 0;
	line-height: 1.2;
}

.jvc-header-dot {
	color: var(--jvc-accent);
	font-weight: 800;
}

/* ── Cards Track ── */
.jvc-track-wrapper {
	padding: 0 40px;
	overflow: hidden;
}

.jvc-track {
	display: flex;
	gap: 20px;
	transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
}

.jvc-card {
	width: 240px;
	min-width: 240px;
	height: 380px;
	border-radius: 14px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid var(--jvc-border);
	transition: all 0.3s ease;
	flex-shrink: 0;
	position: relative;
}

.jvc-card:hover {
	border-color: var(--jvc-accent);
	transform: translateY(-4px);
	box-shadow: 0 12px 30px var(--jvc-card-shadow);
}

.jvc-card-thumb {
	width: 100%;
	height: 100%;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
}

.jvc-carousel .jvc-card-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	pointer-events: none;
	display: block;
}

.jvc-card-thumb > *:not(.jvc-card-img) {
	position: relative;
	z-index: 1;
}

/* ── Card Badges Top ── */
.jvc-card-badges-top {
	display: flex;
	gap: 6px;
	padding: 12px;
	flex-wrap: wrap;
}

.jvc-badge-number {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	background: #00C853;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
}

.jvc-badge-date {
	display: inline-flex;
	align-items: center;
	background: var(--jvc-btn-bg);
	color: var(--jvc-heading);
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 4px;
}

.jvc-card-quality {
	padding: 0 12px;
}

.jvc-badge-quality {
	display: inline-flex;
	align-items: center;
	background: var(--jvc-btn-bg);
	color: var(--jvc-heading);
	font-size: 10px;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

/* ── Play Overlay ── */
.jvc-card-play {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.3);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.jvc-card:hover .jvc-card-play {
	opacity: 1;
}

.jvc-card-play svg {
	color: #fff;
	filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* ── Card Bottom Info ── */
.jvc-card-bottom {
	padding: 15px 12px;
	background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.jvc-card-stats {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
}

.jvc-stat-comments {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--jvc-muted);
	font-size: 11px;
}

.jvc-stat-comments svg {
	opacity: 0.7;
}

.jvc-card-title {
	color: var(--jvc-heading);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ── Footer / Navigation ── */
.jvc-footer {
	display: flex;
	align-items: center;
	gap: 25px;
	padding: 25px 40px 0;
}

.jvc-nav-arrows {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
}

.jvc-arrow {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: var(--jvc-btn-bg);
	border: 1px solid var(--jvc-btn-border);
	color: var(--jvc-heading);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.jvc-arrow:hover {
	background: rgba(255,255,255,0.15);
	border-color: rgba(255,255,255,0.3);
}

.jvc-arrow:active {
	transform: scale(0.95);
}

.jvc-arrow svg {
	stroke: var(--jvc-heading);
}

/* ── Progress Bar ── */
.jvc-progress {
	flex: 1;
}

.jvc-progress-track {
	width: 100%;
	height: 3px;
	background: var(--jvc-border);
	border-radius: 2px;
	overflow: hidden;
}

.jvc-progress-bar {
	height: 100%;
	background: var(--jvc-accent);
	border-radius: 2px;
	transition: width 0.5s ease;
	width: 0%;
}

/* ── YouTube Player Modal ── */
.jvc-player-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: jvcFadeIn 0.3s ease;
}

@keyframes jvcFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.jvc-player-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.85);
}

.jvc-player-content {
	position: relative;
	width: 90%;
	max-width: 900px;
	z-index: 2;
}

.jvc-player-close {
	position: absolute;
	top: -45px;
	right: 0;
	background: var(--jvc-btn-bg);
	border: 1px solid var(--jvc-btn-border);
	color: var(--jvc-heading);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	font-size: 22px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.jvc-player-close:hover {
	background: color-mix(in srgb, var(--jvc-accent) 70%, transparent);
}

.jvc-player-frame {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	border-radius: 12px;
	overflow: hidden;
	background: #000;
	box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.jvc-player-frame iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* ── Responsive ── */
@media (max-width: 768px) {
	.jvc-carousel {
		padding: 25px 0;
	}

	.jvc-header {
		padding: 0 20px 20px;
	}

	.jvc-header-icon {
		width: 40px;
		height: 40px;
		border-radius: 10px;
		padding: 8px 6px;
		gap: 2px;
	}

	.jvc-eq-bar {
		width: 3px;
	}

	.jvc-header-title {
		font-size: 1.3rem;
	}

	.jvc-track-wrapper {
		padding: 0 20px;
	}

	.jvc-track {
		gap: 14px;
	}

	.jvc-card {
		width: 180px;
		min-width: 180px;
		height: 300px;
	}

	.jvc-footer {
		padding: 20px 20px 0;
		gap: 15px;
	}

	.jvc-arrow {
		width: 36px;
		height: 36px;
	}

	.jvc-player-content {
		width: 95%;
	}

	.jvc-player-close {
		top: -40px;
	}
}

@media (max-width: 480px) {
	.jvc-card {
		width: 160px;
		min-width: 160px;
		height: 260px;
	}

	.jvc-card-title {
		font-size: 12px;
	}

	.jvc-badge-number,
	.jvc-badge-date {
		font-size: 10px;
		padding: 2px 6px;
	}
}
