.ytcs-slider-wrap {
	max-width: 100%;
	margin: 20px 0;
}

.ytcs-slider-track-outer {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ytcs-slider-viewport {
	overflow: hidden;
	flex: 1;
}

.ytcs-slider-track {
	display: flex;
	transition: transform 0.35s ease;
}

.ytcs-slide {
	flex: 0 0 33.3333%;
	max-width: 33.3333%;
	box-sizing: border-box;
	padding: 0 8px;
}

.ytcs-video-thumb {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	border-radius: 6px;
	overflow: hidden;
}

.ytcs-video-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 6px;
}

.ytcs-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 54px;
	height: 54px;
	line-height: 54px;
	text-align: center;
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	border-radius: 50%;
	font-size: 20px;
	padding-left: 4px;
}

.ytcs-video-title {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.4;
}

.ytcs-nav {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #ccc;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ytcs-nav:hover:not(:disabled) {
	background: #f0f0f0;
}

.ytcs-nav:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.ytcs-error {
	padding: 12px 16px;
	background: #fdecea;
	border: 1px solid #f5c2c0;
	color: #611a15;
	border-radius: 4px;
}

/* Modal */
.ytcs-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
}

.ytcs-modal.ytcs-modal-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 16px;
	box-sizing: border-box;
	overflow-y: auto;
}

.ytcs-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
}

.ytcs-modal-inner {
	position: relative;
	max-width: 900px;
	width: 90%;
	margin: 0 auto;
	flex-shrink: 0;
}

.ytcs-modal-content {
	position: relative;
	background: #000;
	border-radius: 6px;
	overflow: hidden;
}

.ytcs-modal-iframe-wrap {
	position: relative;
	width: 100%;
	padding-top: 56.25%; /* 16:9 */
}

.ytcs-modal-iframe-wrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.ytcs-modal-close {
	position: absolute;
	top: -46px;
	right: 0;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: #fff;
	color: #000;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ytcs-modal-close:hover {
	background: #f0f0f0;
}

/* Responsive: 1 video per view on small screens */
@media (max-width: 600px) {
	.ytcs-slide {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.ytcs-slider-track-outer {
		gap: 6px;
	}

	.ytcs-nav {
		width: 32px;
		height: 32px;
		font-size: 13px;
	}

	.ytcs-video-title {
		font-size: 13px;
	}

	.ytcs-play-icon {
		width: 42px;
		height: 42px;
		line-height: 42px;
		font-size: 16px;
	}

	.ytcs-modal-inner {
		width: 94%;
	}

	.ytcs-modal-close {
		top: -42px;
		width: 32px;
		height: 32px;
		font-size: 18px;
	}
}

@media (min-width: 601px) and (max-width: 900px) {
	.ytcs-slide {
		flex: 0 0 50%;
		max-width: 50%;
	}
}

/* Prevent accidental page scroll while swiping the slider on touch devices */
.ytcs-slider-viewport {
	touch-action: pan-y;
}
