/* =============================================================================
   Newsam Video Slider — v1.1
   ============================================================================= */

.newsam-vs-wrapper {
	width: 100%;
	box-sizing: border-box;
	background: #111;
	border-radius: 4px;
	overflow: hidden;
}

/* ── Main Player ─────────────────────────────────────────────────────────── */

.newsam-vs-iframe-container {
	position: relative;
	width: 100%;
	padding-bottom: 56.25%; /* 16:9 */
	background: #000;
}

/* YT API creates an <iframe> inside the div — target it */
.newsam-vs-iframe-container iframe,
#newsam-yt-player,
#newsam-yt-player iframe {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	border: 0;
}


/* ── Mute / Unmute button overlay ────────────────────────────────────────── */

.newsam-vs-mute-btn {
	display: none; /* hidden on desktop — YouTube native controls are sufficient */
}

.newsam-vs-mute-btn:hover,
.newsam-vs-mute-btn:focus {
	background: rgba(0, 0, 0, 0.85);
	outline: none;
}

.newsam-vs-mute-btn:active {
	transform: scale(0.92);
}

.newsam-vs-mute-btn svg {
	width: 22px;
	height: 22px;
	display: block;
	pointer-events: none;
}

@media (max-width: 768px) {
	.newsam-vs-mute-btn {
		display: flex;
		position: absolute;
		bottom: 44px;
		left: 8px;
		z-index: 10;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		border: none;
		background: rgba(0, 0, 0, 0.65);
		color: #fff;
		cursor: pointer;
		align-items: center;
		justify-content: center;
		padding: 0;
		transition: background 0.18s, transform 0.12s;
		-webkit-tap-highlight-color: transparent;
	}
	.newsam-vs-mute-btn:active {
		transform: scale(0.92);
	}
	.newsam-vs-mute-btn svg {
		width: 18px;
		height: 18px;
		display: block;
		pointer-events: none;
	}
}

/* ── Thumbnail Strip ─────────────────────────────────────────────────────── */

.newsam-vs-strip {
	display: flex;
	align-items: stretch;
	height: 72px;
	background: #0d0d0d;
	padding: 0;
	box-sizing: border-box;
}

/* Arrows */
.newsam-vs-arrow {
	flex: 0 0 24px;
	width: 24px;
	height: 100%;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	transition: color 0.18s;
	border-radius: 2px;
}

.newsam-vs-arrow svg {
	width: 18px;
	height: 18px;
	display: block;
}

.newsam-vs-arrow:hover:not(:disabled) {
	color: #fff;
}

.newsam-vs-arrow:disabled {
	opacity: 0.2;
	cursor: default;
}

/* Viewport */
.newsam-vs-thumbs-viewport {
	flex: 1;
	overflow: hidden;
	align-self: stretch;
}

.newsam-vs-thumbs-track {
	display: flex;
	align-items: stretch;
	height: 100%;
	gap: 4px;
	padding: 0 3px;
	box-sizing: border-box;
}

/* Individual Thumbnail */
.newsam-vs-thumb {
	flex: 1 1 0;
	min-width: 0;
	position: relative;
	cursor: pointer;
	border-radius: 2px;
	overflow: hidden;
	border: 1.5px solid transparent;
	transition: border-color 0.18s;
	background: #222;
	align-self: stretch;
}

/* Thumbnail image — fills the slot absolutely */
.newsam-vs-thumb img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.newsam-vs-thumb.active {
	border-color: #e2271a;
}

.newsam-vs-thumb:hover {
	border-color: rgba(255,255,255,0.4);
}


/* Play icon — centered overlay (Elementor red style) */
.newsam-vs-play-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,0.25);
	pointer-events: none;
}

.newsam-vs-play-icon svg {
	width: 22px;
	height: 22px;
	background: #e2271a;
	border-radius: 50%;
	padding: 4px 4px 4px 5px; /* nudge triangle to centre */
	box-sizing: border-box;
	filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

/* Title overlay — appears on hover */
.newsam-vs-hover-title {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0,0,0,0.82);
	color: #fff;
	font-size: 9px;
	line-height: 1.3;
	padding: 3px 4px;
	opacity: 0;
	transition: opacity 0.18s;
	pointer-events: none;
	/* 2-line max */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.newsam-vs-thumb:hover .newsam-vs-hover-title {
	opacity: 1;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
	.newsam-vs-strip { height: 36px; }
	.newsam-vs-arrow { flex: 0 0 20px; width: 20px; }
	.newsam-vs-arrow svg { width: 14px; height: 14px; }
	.newsam-vs-play-icon svg { width: 16px; height: 16px; }
}

/* Empty state */
.newsam-vs-empty {
	padding: 16px;
	text-align: center;
	color: #666;
}
