/* Service Media Carousel Styles */

.snc-service-media-carousel {
	margin: 30px 0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	background: #fff;
}

/* Main Media Viewer */
.snc-media-main {
	position: relative;
	background: #000;
	overflow: hidden;
}

.snc-media-viewer {
	position: relative;
	width: 100%;
	height: 400px;
	overflow: hidden;
}

.snc-media-item {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	display: flex;
	align-items: center;
	justify-content: center;
}

.snc-media-item.active {
	opacity: 1;
}

.snc-media-item img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 8px;
}

.snc-media-item video {
	max-width: 100%;
	max-height: 100%;
	border-radius: 8px;
}

.snc-media-item iframe {
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 8px;
}

/* Navigation Arrows */
.snc-media-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 10;
	color: #333;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.snc-media-nav:hover {
	background: rgba(255, 255, 255, 1);
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.snc-media-nav:active {
	transform: translateY(-50%) scale(0.95);
}

.snc-media-prev {
	left: 20px;
}

.snc-media-next {
	right: 20px;
}

.snc-media-nav svg {
	width: 24px;
	height: 24px;
}

/* Thumbnail Carousel */
.snc-media-thumbnails {
	padding: 20px;
	background: #f8f9fa;
	border-top: 1px solid #e9ecef;
}

.snc-thumbnails-container {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding: 5px 0;
	scrollbar-width: thin;
	scrollbar-color: #ddd transparent;
}

.snc-thumbnails-container::-webkit-scrollbar {
	height: 6px;
}

.snc-thumbnails-container::-webkit-scrollbar-track {
	background: transparent;
}

.snc-thumbnails-container::-webkit-scrollbar-thumb {
	background: #ddd;
	border-radius: 3px;
}

.snc-thumbnails-container::-webkit-scrollbar-thumb:hover {
	background: #bbb;
}

.snc-thumbnail-item {
	flex-shrink: 0;
	width: 80px;
	height: 60px;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	transition: all 0.3s ease;
	background: #fff;
	position: relative;
	padding: 0;
}

.snc-thumbnail-item:hover {
	border-color: #007cba;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 124, 186, 0.2);
}

.snc-thumbnail-item.active {
	border-color: #007cba;
	box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.snc-thumbnail-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.snc-thumbnail-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.7);
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	pointer-events: none;
}

.snc-thumbnail-play-icon svg {
	width: 12px;
	height: 12px;
	margin-left: 1px; /* Slight adjustment for visual centering */
}

/* Responsive Design */
@media (max-width: 768px) {
	.snc-media-viewer {
		height: 250px;
	}
	
	.snc-media-nav {
		width: 40px;
		height: 40px;
	}
	
	.snc-media-prev {
		left: 10px;
	}
	
	.snc-media-next {
		right: 10px;
	}
	
	.snc-media-nav svg {
		width: 20px;
		height: 20px;
	}
	
	.snc-media-thumbnails {
		padding: 15px;
	}
	
	.snc-thumbnail-item {
		width: 60px;
		height: 45px;
	}
	
	.snc-thumbnail-play-icon {
		width: 20px;
		height: 20px;
	}
	
	.snc-thumbnail-play-icon svg {
		width: 10px;
		height: 10px;
	}
}

@media (max-width: 480px) {
	.snc-media-viewer {
		height: 200px;
	}
	
	.snc-media-nav {
		width: 36px;
		height: 36px;
	}
	
	.snc-media-prev {
		left: 8px;
	}
	
	.snc-media-next {
		right: 8px;
	}
	
	.snc-media-nav svg {
		width: 18px;
		height: 18px;
	}
	
	.snc-media-thumbnails {
		padding: 12px;
	}
	
	.snc-thumbnail-item {
		width: 50px;
		height: 38px;
	}
}

/* Loading States */
.snc-media-item.loading {
	background: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.snc-media-item.loading::after {
	content: '';
	width: 40px;
	height: 40px;
	border: 4px solid #ddd;
	border-top: 4px solid #007cba;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Error States */
.snc-media-item.error {
	background: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #6c757d;
	flex-direction: column;
	gap: 10px;
}

.snc-media-item.error::before {
	content: '⚠️';
	font-size: 24px;
}

.snc-media-item.error::after {
	content: 'Failed to load media';
	font-size: 14px;
}

/* Accessibility */
.snc-media-nav:focus,
.snc-thumbnail-item:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.snc-media-nav {
		background: #fff;
		border: 2px solid #000;
	}
	
	.snc-thumbnail-item.active {
		border-color: #000;
	}
	
	.snc-thumbnail-item:hover {
		border-color: #000;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.snc-media-item,
	.snc-media-nav,
	.snc-thumbnail-item {
		transition: none;
	}
	
	.snc-media-nav:hover {
		transform: translateY(-50%);
	}
	
	.snc-thumbnail-item:hover {
		transform: none;
	}
}
