/* Element Craft — Button: Play Video (play icon + Lity lightbox skin) */

/* ---------- Play icon ---------- */
.ecelements-button .ec-btn-play-icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2em;
	height: 2em;
	padding: 0;
	border-radius: 50%;
	color: currentColor;
	background-color: rgba(255, 255, 255, 0.22);
	--ec-play-pulse: rgba(255, 255, 255, 0.22);
}

.ecelements-button .ec-btn-play-icon svg {
	display: block;
	width: 0.9em;
	height: 0.9em;
	margin-inline-start: 0.1em;
	fill: currentColor;
}

[dir="rtl"] .ecelements-button .ec-btn-play-icon svg {
	transform: scaleX(-1);
	margin-inline-start: 0;
	margin-inline-end: 0.1em;
}

.ecelements-button .ec-btn-play-icon.has-pulse::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-color: var(--ec-play-pulse);
	pointer-events: none;
	animation: ec-btn-play-pulse 1.8s ease-out infinite;
}

@keyframes ec-btn-play-pulse {
	0% {
		transform: scale(1);
		opacity: 0.7;
	}
	100% {
		transform: scale(1.9);
		opacity: 0;
	}
}

/* ---------- Lightbox skin (.lity.ec-lity, appended to <body>) ---------- */
.lity.ec-lity {
	background: var(--ec-lity-bg, rgba(8, 12, 24, 0.88));
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.lity.ec-lity .lity-container {
	width: 100%;
	max-width: min(var(--ec-lity-max, 1000px), 94vw);
}

.lity.ec-lity .lity-content {
	border-radius: 14px;
	overflow: visible;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.lity.ec-lity.lity-loading .lity-content,
.lity.ec-lity.lity-closed .lity-content {
	transform: translateY(16px) scale(0.96);
	opacity: 0;
}

.lity.ec-lity .lity-content::after {
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
	border-radius: 14px;
}

.lity.ec-lity .lity-iframe-container {
	padding-top: var(--ec-lity-pad, 56.25%);
	border-radius: 14px;
	overflow: hidden;
	background: #000;
}

.lity.ec-lity .lity-iframe-container iframe {
	box-shadow: none;
	border-radius: 14px;
}

.lity.ec-lity .ec-lity-video {
	display: block;
	width: 100%;
	max-height: 86vh;
	border-radius: 14px;
	background: #000;
	outline: none;
}

.lity.ec-lity .lity-close {
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-size: 28px;
	line-height: 44px;
	text-shadow: none;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.lity.ec-lity .lity-close:hover,
.lity.ec-lity .lity-close:focus-visible {
	background: rgba(255, 255, 255, 0.28);
	transform: rotate(90deg);
}

.lity.ec-lity .lity-close:focus-visible {
	outline: 2px solid #fff !important;
	outline-offset: 2px;
}

.lity.ec-lity .lity-close:active {
	top: 17px;
}

@media (max-width: 767px) {
	.lity.ec-lity .lity-close {
		top: 10px;
		right: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ecelements-button .ec-btn-play-icon.has-pulse::after {
		animation: none;
		opacity: 0;
	}

	.lity.ec-lity .lity-content,
	.lity.ec-lity .lity-close {
		transition: none;
	}
}
