/*
 * Demo video player (assets/demo/demo.js) and the demo buttons: the site's dark card
 * style over a blurred backdrop; the 720px square video is never cropped.
 */

.wx-demo {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	place-items: center;
	padding: 24px;
	background: rgba(12, 12, 12, .72);
	opacity: 0;
	visibility: hidden;
	backdrop-filter: blur(8px);
	transition: opacity .35s ease, visibility .35s;
}

.wx-demo.is-open {
	opacity: 1;
	visibility: visible;
}

html.wx-demo-open {
	overflow: hidden;
}

.wx-demo__panel {
	/* the narrated demos are 1920x1080: as wide as fits, never taller than the screen */
	width: min(1120px, 100%, calc((100vh - 170px) * 16 / 9 + 36px));
	padding: 18px 18px 20px;
	border: 1px solid rgba(252, 246, 239, .12);
	border-radius: 30px;
	background:
		radial-gradient(circle at 100% 0, transparent 179px, rgba(252, 246, 239, .08) 180px, transparent 181.5px),
		#131313;
	box-shadow: 0 60px 120px -40px rgba(0, 0, 0, .8);
	transform: translateY(20px) scale(.97);
	transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}

.wx-demo.is-open .wx-demo__panel {
	transform: none;
}

.wx-demo__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 6px 14px;
}

.wx-demo p.wx-demo__title {
	margin: 0;
	color: #fcf6ef;
	font-family: "Manrope", sans-serif;
	font-size: 18px;
	font-weight: 600;
}

.wx-demo__close {
	position: relative;
	flex: none;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid rgba(252, 246, 239, .25);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background-color .25s ease, border-color .25s ease;
}

.wx-demo__close::before,
.wx-demo__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 1.5px;
	background: #fcf6ef;
	transform: translate(-50%, -50%) rotate(45deg);
}

.wx-demo__close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.wx-demo__close:hover {
	border-color: #fcf6ef;
	background: rgba(252, 246, 239, .1);
}

.wx-demo__frame {
	overflow: hidden;
	aspect-ratio: 16 / 9;
	border-radius: 20px;
	background: #0e0e0e;
}

.wx-demo__frame video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wx-demo p.wx-demo__note {
	margin: 14px 6px 0;
	color: #a8a39c;
	font-family: "Manrope", sans-serif;
	font-size: 14px;
}

/* ---------- the play icon on demo buttons ---------- */

.wx-demo-btn .wp-block-button__link::after {
	display: none !important;
}

.wx-demo-btn .wp-block-button__link::before {
	content: "";
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 1 0 22 11 11 0 0 1 0-22zm-2 7v8l6-4z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1a11 11 0 1 1 0 22 11 11 0 0 1 0-22zm-2 7v8l6-4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- Services hub: a play button over each card's picture ---------- */

.wx-svc-hub .wx-svc-line {
	position: relative;
}

.wx-svc-hub p.wx-svc-line__demo {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	width: 100%;
	aspect-ratio: 16 / 8;
	margin: 0 !important;
	padding: 24px 28px;
	pointer-events: none;
}

.wx-svc-hub .wx-svc-line__demo a.wx-demo-link {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 20px 8px 8px;
	border: 1px solid rgba(252, 246, 239, .3);
	border-radius: 40px;
	background: rgba(19, 19, 19, .55);
	color: #fcf6ef !important;
	font-size: 15px !important;
	font-weight: 600;
	text-decoration: none;
	pointer-events: auto;
	backdrop-filter: blur(8px);
	transition: background-color .3s ease, border-color .3s ease, transform .3s ease;
}

.wx-svc-line__demo a.wx-demo-link::before {
	content: "";
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #fcf6ef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23131313' d='M9 6.5v11l9-5.5z'/%3E%3C/svg%3E") 55% center / 16px no-repeat;
	box-shadow: 0 0 0 0 rgba(252, 246, 239, .45);
	animation: wx-demo-ping 2.4s ease-out infinite;
}

.wx-svc-hub .wx-svc-line__demo a.wx-demo-link:hover {
	border-color: #fcf6ef;
	background: rgba(19, 19, 19, .8);
	transform: translateY(-2px);
}

@keyframes wx-demo-ping {
	70% {
		box-shadow: 0 0 0 12px rgba(252, 246, 239, 0);
	}

	100% {
		box-shadow: 0 0 0 0 rgba(252, 246, 239, 0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.wx-svc-line__demo a.wx-demo-link::before {
		animation: none;
	}
}

@media (max-width: 1024px) {
	.wx-svc-hub p.wx-svc-line__demo {
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 767px) {
	.wx-svc-hub p.wx-svc-line__demo {
		padding: 14px;
	}

	.wx-svc-hub .wx-svc-line__demo a.wx-demo-link {
		font-size: 13px !important;
	}

	.wx-svc-line__demo a.wx-demo-link::before {
		width: 32px;
		height: 32px;
	}

	.wx-demo__panel {
		padding: 12px 12px 14px;
		border-radius: 22px;
	}
}
