.pv-videos-wrapper {
	--pv-gap: 20px;
	width: 100%;
	box-sizing: border-box;
}

.pv-videos-wrapper * {
	box-sizing: border-box;
}

.pv-no-videos {
	color: #6b7280;
	font-style: italic;
	padding: 16px 0;
	margin: 0;
}

/* Featured video, full width */
.pv-featured {
	margin-bottom: var(--pv-gap);
}

.pv-featured .pv-video-item {
	width: 100%;
}

.pv-featured .pv-thumb-wrap {
	padding-top: 40%; /* wider aspect for the highlighted slot */
}

/* Grid: 1 col / 2 cols / 3 cols / 4 cols (wraps beyond 4) */
.pv-video-grid {
	display: grid !important;
	width: 100%;
	gap: var(--pv-gap);
	grid-template-columns: repeat(4, 1fr);
	list-style: none;
	margin: 0;
	padding: 0;
}

.pv-video-grid[data-count="1"] {
	grid-template-columns: 1fr;
}

.pv-video-grid[data-count="2"] {
	grid-template-columns: repeat(2, 1fr);
}

.pv-video-grid[data-count="3"] {
	grid-template-columns: repeat(3, 1fr);
}

.pv-video-grid[data-count="4"] {
	grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
	.pv-video-grid[data-count="3"],
	.pv-video-grid[data-count="4"] {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.pv-video-grid {
		grid-template-columns: 1fr !important;
	}

	.pv-featured .pv-thumb-wrap {
		padding-top: 56.25%;
	}
}

.pv-video-item {
	width: 100% !important;
	max-width: 100%;
}

.pv-video-trigger,
.pv-video-trigger:hover,
.pv-video-trigger:focus,
.pv-video-trigger:active,
.pv-video-trigger:visited {
	display: block !important;
	width: 100% !important;
	max-width: 100%;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
	transition: none;
}

.pv-video-trigger:focus-visible {
	outline: 2px solid rgba(0, 0, 0, 0.35) !important;
	outline-offset: 3px;
}

.pv-thumb-wrap {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	height: auto !important;
	padding-top: 56.25%; /* 16:9 */
	overflow: hidden;
	border-radius: 8px;
	background: #000;
	border: 0 !important;
	box-shadow: none !important;
	/* Whatever happens inside (zoom, theme hover effects, etc.) can never
	   resize this box or shift the title below it. */
	contain: layout paint;
}

.pv-thumb {
	position: absolute !important;
	inset: 0 !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: none !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	transition: transform 0.25s ease;
}

/* Scale only the image, clipped by the wrap's overflow:hidden — scaling the
   wrap itself would create a stacking context that paints over the title. */
.pv-video-trigger:hover .pv-thumb,
.pv-video-trigger:focus-visible .pv-thumb {
	transform: scale(1.05);
}

.pv-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 68px;
	height: 48px;
	pointer-events: none;
	opacity: 0.92;
	transition: opacity 0.2s ease;
}

.pv-video-trigger:hover .pv-play-icon,
.pv-video-trigger:focus-visible .pv-play-icon {
	opacity: 1;
}

.pv-play-icon svg {
	width: 100%;
	height: 100%;
}

.pv-video-title {
	position: relative;
	z-index: 1;
	display: block;
	margin-top: 10px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--e-global-color-primary, inherit);
}

.pv-featured .pv-video-title {
	font-size: 20px;
}

/* Lightbox */
.pv-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.pv-lightbox.is-open {
	display: flex;
}

.pv-lightbox-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.pv-lightbox-inner {
	position: relative;
	width: 100%;
	max-width: 1100px;
	z-index: 1;
}

.pv-lightbox-video {
	position: relative;
	width: 100%;
	padding-top: 56.25%;
	background: #000;
}

.pv-lightbox-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.pv-lightbox-close {
	position: absolute;
	top: -44px;
	right: 0;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.pv-lightbox-close:hover {
	color: #ccc;
}

body.pv-lightbox-active {
	overflow: hidden;
}
