/* Product Video Gallery – як на pracowniaopraw.pl */
.custom-liquid.product-video-gallery-wrapper {
	margin: 0.7rem 0;
	width: 100%;
}

.video-slider-wrapper {
	position: relative;
	width: 100%;
	margin: 20px 0;
	overflow: hidden;
}

.video-slider {
	display: flex;
	flex-wrap: nowrap;
	overflow: hidden;
	scroll-behavior: smooth;
	gap: 2px;
	cursor: grab;
}

.video-slider.active {
	cursor: grabbing;
}

.video-item {
	flex: 0 0 30%;
	margin-right: 5px;
	border-radius: 15px;
	position: relative;
	cursor: pointer;
	overflow: hidden;
}

.video-item:last-child {
	margin-right: 0;
}

.video-item::before {
	content: "";
	position: absolute;
	top: 10px;
	left: 10px;
	width: 25px;
	height: 25px;
	background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTggNVYxOUwxOSAxMkw4IDVaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4K');
	background-size: cover;
	background-repeat: no-repeat;
	z-index: 1;
}

.video-item img {
	width: 100%;
	display: block;
	transition: transform 0.5s;
	height: auto;
	object-fit: cover;
	border-radius: 15px;
}

.video-item:hover img {
	transform: scale(1.1);
}

@media (max-width: 768px) {
	.video-item {
		flex: 0 0 40%;
	}
}

.slider-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(255, 255, 255, 0.9);
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
	width: 35px;
	height: 35px;
	border-radius: 50%;
	opacity: 0.8;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: opacity 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.slider-btn:hover {
	opacity: 1;
	background-color: #fff;
}

.slider-btn.left {
	left: 10px;
}

.slider-btn.left::before {
	content: '\2039';
	font-size: 24px;
	line-height: 1;
	color: #000;
}

.slider-btn.right {
	right: 10px;
}

.slider-btn.right::before {
	content: '\203A';
	font-size: 24px;
	line-height: 1;
	color: #000;
}

/* Modal */
.video-modal-block {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.9);
	backdrop-filter: blur(5px);
	align-items: center;
	justify-content: center;
}

.video-modal-block.active {
	display: flex;
}

.video-swiper-block {
	width: 100%;
	position: relative;
}

.video-swiper-block .swiper-wrapper {
	margin: 0;
	padding: 0;
}

.video-swiper-block .swiper-slide {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
	width: 352.333px;
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
	transition: all 0.3s ease;
}

.video-swiper-block .swiper-slide video {
	max-height: 65vh;
	border-radius: 20px;
	width: 100%;
	transition: all 0.3s ease;
}

.video-swiper-block .swiper-slide.swiper-slide-active {
	width: 352.333px;
}

.video-swiper-block .swiper-slide.swiper-slide-active video {
	max-height: 80vh;
}

.videowraper-block {
	position: relative;
}

.videowraper-block video {
	width: 100%;
	height: auto;
	display: block;
	outline: none;
}

.video-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid #fff;
	border-radius: 50%;
	animation: zebra-video-spin 1s linear infinite;
	z-index: 5;
	pointer-events: none;
	display: none;
}

.video-swiper-block .swiper-slide .video-loader {
	display: none;
}

@keyframes zebra-video-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.iconwrapper {
	position: absolute;
	top: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: space-between;
	padding: 0 10px;
	z-index: 10000;
}

.iconwrapper.display-none {
	display: none;
}

.video-swiper-block .swiper-slide.swiper-slide-active .iconwrapper.display-none {
	display: flex;
}

.mute-toggle-block,
.close-modal-block {
	background: #000;
	opacity: 0.5;
	border: none;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: #fff;
	font-size: 2rem;
	transition: opacity 0.3s ease;
}

.mute-toggle-block:hover,
.close-modal-block:hover {
	opacity: 0.8;
}

.close-modal-block {
	font-size: 2rem;
	line-height: 1;
}

.video-swiper-block .swiper-button-next {
	right: 31%;
	color: #fff;
}

.video-swiper-block .swiper-button-prev {
	left: 30%;
	color: #fff;
}

.video-swiper-block .swiper-button-disabled {
	display: none;
}

@media (max-width: 767px) {
	.video-swiper-block {
		width: 90%;
	}
	.video-swiper-block .swiper-slide {
		width: 100% !important;
		max-width: 100%;
	}
	.video-swiper-block .swiper-slide.swiper-slide-active {
		width: 100% !important;
		max-width: 100%;
	}
	.video-swiper-block .swiper-button-next {
		right: 0;
	}
	.video-swiper-block .swiper-button-prev {
		left: 0;
	}
	.iconwrapper {
		padding: 0 20px;
	}
}
