/* ============================================================
   Video Carousel Widget — Frontend Styles
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.vcw-wrapper {
	position: relative;
	width: 100%;
}

/* ── Section Header ─────────────────────────────────────── */
.vcw-section-header {
	margin-bottom: 40px;
}

.vcw-section-title {
	margin: 0 0 10px;
	line-height: 1.2;
}

.vcw-section-subtitle {
	margin: 0;
	line-height: 1.6;
}

/* ── Carousel Container ─────────────────────────────────── */
.vcw-carousel-container {
	position: relative;
}

/* ── Swiper overrides ──────────────────────────────────── */
.vcw-swiper {
	padding-bottom: 48px !important;
	overflow: visible;
	clip-path: inset(-100vw -100vw 0 -100vw); /* clip only bottom for pagination */
}

.vcw-swiper .swiper-wrapper {
	align-items: stretch;
}

/* ── Video Card ─────────────────────────────────────────── */
.vcw-video-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	height: 100%;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Effects */
.vcw-hover-lift:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.vcw-hover-scale:hover {
	transform: scale(1.03);
	box-shadow: 0 16px 32px rgba(0,0,0,0.12) !important;
}

.vcw-hover-glow:hover {
	box-shadow: 0 0 0 3px currentColor, 0 16px 32px rgba(0,0,0,0.12) !important;
}

.vcw-hover-tilt {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ── Video Wrapper (aspect ratios) ─────────────────────── */
.vcw-video-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #000;
}

.vcw-ratio-16-9  { padding-top: 56.25%; }
.vcw-ratio-4-3   { padding-top: 75%; }
.vcw-ratio-1-1   { padding-top: 100%; }
.vcw-ratio-9-16  { padding-top: 177.78%; }

.vcw-video-wrapper iframe,
.vcw-video-wrapper video {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	border: none;
	display: block;
}

/* ── Overlay (thumbnail + play button) ──────────────────── */
.vcw-video-overlay {
	position: absolute;
	top: 0; left: 0;
	width: 100%; height: 100%;
	cursor: pointer;
	overflow: hidden;
}

.vcw-thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.vcw-video-overlay:hover .vcw-thumbnail {
	transform: scale(1.04);
}

.vcw-video-overlay::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.35);
	transition: background 0.3s ease;
}

.vcw-video-overlay:hover::after {
	background: rgba(0,0,0,0.5);
}

/* ── Play Button ────────────────────────────────────────── */
.vcw-play-btn {
	position: absolute;
	top: 50%; left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: rgba(255,255,255,0.25);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	border: 2px solid rgba(255,255,255,0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.vcw-play-btn svg {
	width: 32px;
	height: 32px;
	fill: #fff;
	margin-left: 4px; /* optical centre */
}

.vcw-video-overlay:hover .vcw-play-btn {
	transform: translate(-50%, -50%) scale(1.12);
	background: rgba(255,255,255,0.35);
}

/* ── Video that has been activated ─────────────────────── */
.vcw-video-wrapper.vcw-playing iframe,
.vcw-video-wrapper.vcw-playing video {
	z-index: 3;
}

/* ── Video Info ─────────────────────────────────────────── */
.vcw-video-info {
	padding: 16px 20px 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.vcw-video-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.35;
}

.vcw-video-description {
	font-size: 0.875rem;
	margin: 0;
	line-height: 1.6;
	flex: 1;
}

/* ── Overlay Info Position ──────────────────────────────── */
.vcw-info-overlay .vcw-video-wrapper {
	position: relative;
}

.vcw-info-overlay .vcw-video-info {
	position: absolute;
	bottom: 0; left: 0; right: 0;
	z-index: 4;
	background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
	color: #fff;
	padding: 40px 20px 20px;
}

.vcw-info-overlay .vcw-video-title {
	color: #fff;
}

.vcw-info-overlay .vcw-video-description {
	color: rgba(255,255,255,0.85);
}

/* ── Card Button ────────────────────────────────────────── */
.vcw-card-button {
	display: inline-block;
	text-decoration: none;
	text-align: center;
	padding: 10px 24px;
	border-radius: 6px;
	background: #e63946;
	color: #fff;
	font-weight: 600;
	font-size: 0.875rem;
	margin-top: 12px;
	align-self: flex-start;
	line-height: 1.4;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	cursor: pointer;
}

.vcw-card-button:hover {
	text-decoration: none;
}

/* ── Navigation Arrows ──────────────────────────────────── */
.vcw-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(calc(-50% - 24px)); /* account for pagination */
	z-index: 10;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
	transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
}

.vcw-nav-btn:hover {
	background: #e63946;
	box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

.vcw-nav-btn svg {
	width: 24px;
	height: 24px;
	fill: #1a1a2e;
	transition: fill 0.2s ease;
}

.vcw-nav-btn:hover svg {
	fill: #fff;
}

.vcw-prev { left: -24px; }
.vcw-next { right: -24px; }

/* ── Pagination ─────────────────────────────────────────── */
.vcw-pagination {
	bottom: 0 !important;
}

.vcw-pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	opacity: 0.5;
	background: #ccc;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.vcw-pagination .swiper-pagination-bullet-active {
	opacity: 1;
	background: #e63946;
	transform: scale(1.2);
}

/* ── Disabled nav state ─────────────────────────────────── */
.vcw-nav-btn[disabled],
.vcw-nav-btn.swiper-button-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* ── Disabled nav state ─────────────────────────────────── */
.vcw-nav-btn[disabled],
.vcw-nav-btn.swiper-button-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* ── Video Control Bar ──────────────────────────────────── */
.vcw-ctrl-bar {
	position: absolute;
	z-index: 5;
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
}

/* Positions */
.vcw-ctrl-br { bottom: 10px; right: 10px; }
.vcw-ctrl-bl { bottom: 10px; left: 10px;  }
.vcw-ctrl-tr { top: 10px;    right: 10px; }
.vcw-ctrl-tl { top: 10px;    left: 10px;  }

/* ── Individual Control Buttons ─────────────────────────── */
.vcw-ctrl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
	transition: background 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.vcw-ctrl-btn:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.08);
}

.vcw-ctrl-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.vcw-ctrl-btn:active {
	transform: scale(0.95);
}

/* When label text is shown, use a pill shape */
.vcw-ctrl-btn:has(.vcw-ctrl-btn-label) {
	border-radius: 999px;
	padding: 0 12px;
}

.vcw-ctrl-btn svg {
	width: 18px;
	height: 18px;
	fill: #fff;
	flex-shrink: 0;
	display: block;
	transition: fill 0.2s ease;
}

.vcw-ctrl-btn:hover svg {
	fill: #fff;
}

/* Label text inside button */
.vcw-ctrl-btn-label {
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
	color: #fff;
	letter-spacing: 0.02em;
	line-height: 1;
}

/* Mute button — active (currently muted) state */
.vcw-ctrl-mute.is-muted {
	background: rgba(230, 57, 70, 0.75);
}

.vcw-ctrl-mute.is-muted:hover {
	background: rgba(230, 57, 70, 0.95);
}

/* Play/Pause button — paused state */
.vcw-ctrl-playpause.is-paused {
	background: rgba(255, 255, 255, 0.2);
}

/* ── Entrance animation for control bar ─────────────────── */
@keyframes vcwCtrlFadeIn {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

.vcw-ctrl-bar {
	animation: vcwCtrlFadeIn 0.25s ease both;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
	.vcw-prev { left: -12px; }
	.vcw-next { right: -12px; }

	.vcw-nav-btn {
		width: 36px;
		height: 36px;
	}

	.vcw-nav-btn svg {
		width: 18px;
		height: 18px;
	}

	.vcw-ctrl-btn {
		min-width: 30px;
		height: 30px;
	}

	.vcw-ctrl-btn svg {
		width: 15px;
		height: 15px;
	}

	.vcw-ctrl-btn-label {
		font-size: 0.65rem;
	}
}
