/* ============================================================
   Allstar — Video Gallery Widget
   ============================================================ */

/* ── Container ────────────────────────────────────────────── */
.allstar-video-gallery {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	width: 100%;
}

/* ── Thumbnail strip ──────────────────────────────────────── */
.avg-thumbnails {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex-shrink: 0;
	width: 120px;
	max-height: 500px;
	overflow-y: auto;
	scrollbar-width: thin;
}

.avg-thumbnails::-webkit-scrollbar {
	width: 4px;
}

.avg-thumbnails::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, 0.2);
	border-radius: 2px;
}

.avg-thumb {
	position: relative;
	display: block;
	padding: 0;
	margin: 0;
	width: 100%;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	background: #d0d0d0;
	transition: border-color 0.2s ease, opacity 0.2s ease;
	line-height: 0;
}

.avg-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.avg-thumb-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.avg-thumb--active {
	border-color: #0055a5;
}

.avg-thumb:hover:not(.avg-thumb--active) {
	opacity: 0.75;
}

/* ── Player area ──────────────────────────────────────────── */
.avg-player-area {
	flex: 1;
	min-width: 0;
}

.avg-now-playing {
	margin: 0 0 8px;
	font-weight: 600;
	font-size: 1rem;
}

.avg-player-wrap {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	overflow: hidden;
}

.avg-player-slot {
	position: absolute;
	inset: 0;
}

.avg-player-slot iframe,
.avg-player-slot video {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* Vimeo SDK wraps its iframe in a div */
.avg-player-slot > div {
	width: 100%;
	height: 100%;
}

.avg-player-slot > div > iframe {
	width: 100% !important;
	height: 100% !important;
}

/* ── Footer ───────────────────────────────────────────────── */
.avg-player-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 10px;
}

.avg-video-title {
	margin: 0;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.95rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.avg-nav {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.avg-nav-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid currentColor;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: opacity 0.2s ease;
	line-height: 1;
}

.avg-nav-btn:hover {
	opacity: 0.65;
}

.avg-nav-btn svg {
	display: block;
	pointer-events: none;
}

/* ── Mobile: player on top, thumbnails below ──────────────── */
@media (max-width: 767px) {
	.allstar-video-gallery {
		flex-direction: column;
	}

	.avg-thumbnails {
		order: 1;
		flex-direction: row;
		/* !important overrides Elementor's generated responsive width (e.g. 120px) */
		width: 100% !important;
		max-height: none;
		overflow-x: auto;
		overflow-y: hidden;
	}

	.avg-thumbnails::-webkit-scrollbar {
		height: 4px;
	}

	.avg-thumb {
		flex-shrink: 0;
		width: 100px;
	}

	.avg-player-area {
		order: 0;
		width: 100%;
	}
}
