/**
 * Plugin Name: PixelcraftDev Elementor Addon
 * Author: Supapong Sakulkoo (K.Auu)
 * Author URI: https://supapongai.com
 * License: Commercial - Proprietary
 * Copyright: (c) 2026 PixelcraftDev. All rights reserved.
 * Unauthorized copying of this file, via any medium is strictly prohibited.
 */
/**
 * Pixelcraft Video Carousel Styles
 */

.pixelcraft-video-carousel-wrapper {
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

.pixelcraft-video-carousel-wrapper * {
	box-sizing: inherit;
}

/* --- MAIN COVERFLOW SWIPER --- */
.pixelcraft-video-carousel-main {
	width: 100%;
	padding-top: 50px;
	padding-bottom: 50px;
	margin-bottom: 20px;
}

.pixelcraft-video-carousel-main .swiper-slide {
	background-position: center;
	background-size: cover;
	/* Width will be set via Elementor JS or inline styles */
	display: flex;
	justify-content: center;
	align-items: center;
	transition: all 0.3s ease;
	max-width: 100%;
}

/* Ensure mobile and tablet always show side-peeks */
@media (max-width: 1024px) {
	.pixelcraft-video-carousel-main .swiper-slide {
		max-width: 85%;
	}
}

@media (max-width: 767px) {
	.pixelcraft-video-carousel-main .swiper-slide {
		max-width: 100%;
	}
}

.pcd-video-thumbnail {
	position: relative;
	width: 100%;
	display: block;
	overflow: hidden;
	border-radius: 8px; /* Default border radius */
	box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
}

.pcd-video-thumbnail img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

/* Play Icon Overlay (Main) */
.pcd-video-thumbnail .pcd-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 60px;
	color: #ff0000;
	background-color: #fff;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0px 4px 15px rgba(0,0,0,0.2);
	transition: all 0.3s ease;
}

/* Fallback for icon if it's SVG */
.pcd-video-thumbnail .pcd-play-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.pcd-video-thumbnail:hover .pcd-play-icon {
	transform: translate(-50%, -50%) scale(1.1);
}

/* --- THUMBNAILS SWIPER --- */
.pixelcraft-video-carousel-thumbs {
	width: 100%;
	padding: 10px 0;
	box-sizing: border-box;
}

.pixelcraft-video-carousel-thumbs .swiper-slide {
	width: auto; /* Width can be dynamic or set via columns */
	cursor: pointer;
	opacity: 0.5; /* Dim inactive thumbnails */
	transition: opacity 0.3s ease;
}

.pixelcraft-video-carousel-thumbs .swiper-slide-thumb-active,
.pixelcraft-video-carousel-thumbs .swiper-slide:hover {
	opacity: 1;
}

.pcd-thumb-card {
	position: relative;
	width: 100%;
	border-radius: 4px; /* Slightly smaller border radius */
	overflow: hidden;
	box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
	border: 2px solid transparent;
	transition: border-color 0.3s ease;
}

.pixelcraft-video-carousel-thumbs .swiper-slide-thumb-active .pcd-thumb-card {
	border-color: #333; /* Default active border */
}

.pcd-thumb-card img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
}

.pcd-thumb-card .pcd-play-icon-small {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 24px;
	color: #ff0000;
	background-color: rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Thumbnail specific titles */
.pcd-thumb-title {
	margin: 8px 0 0;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* THUMBNAIL ARROWS */
.pixelcraft-thumb-arrows-yes.pixelcraft-thumb-arrows-pos-outer .pixelcraft-video-carousel-thumbs {
	position: relative;
	padding: 10px 40px; /* Space for arrows */
}

.pixelcraft-thumb-arrows-yes.pixelcraft-thumb-arrows-pos-inner .pixelcraft-video-carousel-thumbs {
	position: relative;
	padding: 10px 0;
}

.pixelcraft-video-carousel-thumbs .swiper-button-next,
.pixelcraft-video-carousel-thumbs .swiper-button-prev {
	width: 32px;
	height: 32px;
	background-color: #ffffff;
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	margin-top: -10px; /* Account for title height visually */
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.pixelcraft-video-carousel-thumbs .swiper-button-next:after,
.pixelcraft-video-carousel-thumbs .swiper-button-prev:after {
	font-size: 14px;
	font-weight: bold;
	color: #333;
}

/* Outer position */
.pixelcraft-thumb-arrows-pos-outer .pixelcraft-video-carousel-thumbs .swiper-button-prev { left: 0; }
.pixelcraft-thumb-arrows-pos-outer .pixelcraft-video-carousel-thumbs .swiper-button-next { right: 0; }

/* Inner position */
.pixelcraft-thumb-arrows-pos-inner .pixelcraft-video-carousel-thumbs .swiper-button-prev { left: 10px; }
.pixelcraft-thumb-arrows-pos-inner .pixelcraft-video-carousel-thumbs .swiper-button-next { right: 10px; }

/* Arrow Shapes */
.pixelcraft-thumb-arrows-circle .pixelcraft-video-carousel-thumbs .swiper-button-next,
.pixelcraft-thumb-arrows-circle .pixelcraft-video-carousel-thumbs .swiper-button-prev {
	border-radius: 50%;
}

.pixelcraft-thumb-arrows-rounded .pixelcraft-video-carousel-thumbs .swiper-button-next,
.pixelcraft-thumb-arrows-rounded .pixelcraft-video-carousel-thumbs .swiper-button-prev {
	border-radius: 6px;
}

.pixelcraft-thumb-arrows-square .pixelcraft-video-carousel-thumbs .swiper-button-next,
.pixelcraft-thumb-arrows-square .pixelcraft-video-carousel-thumbs .swiper-button-prev {
	border-radius: 0;
}
