.tvp-playlist {
	--tvp-purple: #782b81;
	--tvp-purple-hover: #5f2267;
	--tvp-text: #1e1e1e;
	--tvp-muted: #95a1bb;
	--tvp-gap: 16px;
	--tvp-cols: 5;
	--tvp-radius: 8px;
	--tvp-slide-basis: calc((100% - (var(--tvp-gap) * (var(--tvp-cols) - 1))) / var(--tvp-cols));
	width: 100%;
	max-width: 100%;
}

.elementor-widget-shortcode:has(.tvp-playlist),
.elementor-element:has(.tvp-playlist),
.e-con:has(.tvp-playlist),
.e-con:has(.tvp-playlist) > .e-con-inner {
	height: auto !important;
	min-height: min-content !important;
	max-height: none !important;
	overflow: visible !important;
	flex-shrink: 0 !important;
	align-self: stretch;
}

.elementor-shortcode:has(.tvp-playlist) {
	height: auto !important;
	overflow: visible !important;
}

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

.tvp-player,
.tvp-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.tvp-slider {
	--tvp-thumb-h: calc((100cqi - (var(--tvp-gap) * (var(--tvp-cols) - 1))) / var(--tvp-cols) * 9 / 16);
	--tvp-arrow-w: 40px;
	--tvp-arrow-h: calc(var(--tvp-thumb-h) * 0.5);
	container-type: inline-size;
	container-name: tvp-slider;
	position: relative;
	margin-top: 24px;
	width: 100%;
}

.tvp-slider__viewport {
	width: 100%;
	min-width: 0;
	overflow: hidden;
}

.tvp-slider__track {
	display: flex;
	gap: var(--tvp-gap);
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-x;
}

.tvp-slider__track::-webkit-scrollbar {
	display: none;
}

.tvp-slide {
	flex: 0 0 var(--tvp-slide-basis);
	min-width: 0;
	max-width: none;
}

.tvp-slide__btn {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: left;
	color: inherit;
	font: inherit;
}

.tvp-slide__thumb {
	display: block;
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--tvp-radius);
	background: #e8eef5;
}

.tvp-slide__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.25s ease;
}

@media (hover: hover) {
	.tvp-slide__btn:hover .tvp-slide__thumb img,
	.tvp-slide__btn:focus-visible .tvp-slide__thumb img {
		transform: scale(1.03);
	}
}

.tvp-slide.is-active .tvp-slide__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 2px solid var(--tvp-purple);
	border-radius: var(--tvp-radius);
	pointer-events: none;
}

.tvp-slide__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 10px;
}

.tvp-slide__title {
	font-family: "Freight Sans Pro", sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.25;
	color: var(--tvp-text);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.5em;
}

.tvp-slide.is-active .tvp-slide__title {
	color: var(--tvp-purple);
}

.tvp-slide__date {
	font-family: "Freight Sans Pro", sans-serif;
	font-size: 13px;
	font-weight: 300;
	line-height: 1.2;
	color: var(--tvp-muted);
}

.tvp-slider__arrow {
	position: absolute;
	z-index: 2;
	top: calc((var(--tvp-thumb-h) - var(--tvp-arrow-h)) / 2);
	width: var(--tvp-arrow-w);
	height: var(--tvp-arrow-h);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	background: var(--tvp-purple);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.tvp-slider__arrow svg {
	display: block;
	width: 12px;
	height: 20px;
}

.tvp-slider__arrow--prev {
	left: 0;
}

.tvp-slider__arrow--next {
	right: 0;
}

.tvp-slider__arrow:hover,
.tvp-slider__arrow:focus-visible {
	background: var(--tvp-purple-hover);
	outline: none;
}

.tvp-slider__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

.tvp-admin-notice {
	padding: 12px 16px;
	background: #f5f0f6;
	border-left: 3px solid var(--tvp-purple);
	color: var(--tvp-text);
	font-size: 14px;
}

@media (max-width: 1024px) {
	.tvp-playlist {
		--tvp-cols: 3.5;
		--tvp-slide-basis: calc((100% - (var(--tvp-gap) * 2.5)) / 3.5);
	}

	.tvp-slider {
		--tvp-thumb-h: calc((100cqi - (var(--tvp-gap) * 2.5)) / 3.5 * 9 / 16);
		--tvp-arrow-w: 36px;
		--tvp-arrow-h: calc(var(--tvp-thumb-h) * 0.5);
	}

	.tvp-slider__arrow svg {
		width: 11px;
		height: 18px;
	}
}

@media (min-width: 768px) and (max-width: 900px) {
	.tvp-playlist {
		--tvp-cols: 3;
		--tvp-slide-basis: calc((100% - (var(--tvp-gap) * 2)) / 3);
	}

	.tvp-slider {
		--tvp-thumb-h: calc((100cqi - (var(--tvp-gap) * 2)) / 3 * 9 / 16);
		--tvp-arrow-h: calc(var(--tvp-thumb-h) * 0.5);
	}
}

@media (max-width: 767px) {
	.tvp-playlist {
		--tvp-cols: 2.5;
		--tvp-gap: 12px;
		--tvp-slide-basis: calc((100% - (var(--tvp-gap) * 1.5)) / 2.5);
	}

	.tvp-slider {
		margin-top: 16px;
		--tvp-thumb-h: calc((100cqi - (var(--tvp-gap) * 1.5)) / 2.5 * 9 / 16);
		--tvp-arrow-w: 28px;
		--tvp-arrow-h: calc(var(--tvp-thumb-h) * 0.55);
	}

	.tvp-slider__arrow svg {
		width: 9px;
		height: 15px;
	}

	.tvp-slide__title {
		font-size: 14px;
		min-height: 0;
	}

	.tvp-slide__meta {
		padding-top: 8px;
	}
}
