/* ---------- Showcase list ([avastar_videos]) ---------- */

.avastar-video-text {
	margin-bottom: 70px; /* same as the old .vc_custom_1611172022279 */
}

/* "Hide related videos" player, from https://maxl.us/hide-related */
.hytPlayerWrap {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
}

.hytPlayerWrap iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

.hytPlayerWrap.ended::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	cursor: pointer;
	background-color: black;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 64px 64px;
	background-image: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiB2aWV3Qm94PSIwIDAgNTEwIDUxMCI+PHBhdGggZD0iTTI1NSAxMDJWMEwxMjcuNSAxMjcuNSAyNTUgMjU1VjE1M2M4NC4xNSAwIDE1MyA2OC44NSAxNTMgMTUzcy02OC44NSAxNTMtMTUzIDE1My0xNTMtNjguODUtMTUzLTE1M0g1MWMwIDExMi4yIDkxLjggMjA0IDIwNCAyMDRzMjA0LTkxLjggMjA0LTIwNC05MS44LTIwNC0yMDQtMjA0eiIgZmlsbD0iI0ZGRiIvPjwvc3ZnPg==);
}

.hytPlayerWrap.paused::after {
	content: "";
	position: absolute;
	top: 70px;
	left: 0;
	bottom: 50px;
	right: 0;
	cursor: pointer;
	background-color: black;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 40px 40px;
	background-image: url(data:image/svg+xml;utf8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEiIHdpZHRoPSIxNzA2LjY2NyIgaGVpZ2h0PSIxNzA2LjY2NyIgdmlld0JveD0iMCAwIDEyODAgMTI4MCI+PHBhdGggZD0iTTE1Ny42MzUgMi45ODRMMTI2MC45NzkgNjQwIDE1Ny42MzUgMTI3Ny4wMTZ6IiBmaWxsPSIjZmZmIi8+PC9zdmc+);
}

/* ---------- Home page teaser ([avastar_latest_video]) ---------- */

.avastar-latest-video {
	display: flex;
	align-items: center;
	gap: 24px;
	/* Wider than the hero's col-md-6, centred on it. */
	width: 860px;
	max-width: calc(100vw - 32px);
	margin: 35px 0 0 50%;
	transform: translateX(-50%);
	padding: 14px;
	text-align: left;
	background: rgba(0, 0, 0, 0.45);
	border: 1px solid rgba(255, 255, 255, 0.25);
}

.avastar-latest-video__thumb {
	position: relative;
	flex: 0 0 440px;
	display: block;
	padding: 0;
	border: 0;
	background: #000;
	cursor: pointer;
	line-height: 0;
	overflow: hidden;
}

.avastar-latest-video__thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 0.3s ease, opacity 0.3s ease;
	opacity: 0.9;
}

.avastar-latest-video__thumb:hover img,
.avastar-latest-video__thumb:focus-visible img {
	transform: scale(1.04);
	opacity: 1;
}

.avastar-latest-video__thumb:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.avastar-latest-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	border: 2px solid #fff;
	transition: background 0.2s ease;
}

.avastar-latest-video__play::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -14px 0 0 -8px;
	border-style: solid;
	border-width: 14px 0 14px 24px;
	border-color: transparent transparent transparent #fff;
}

.avastar-latest-video__thumb:hover .avastar-latest-video__play {
	background: rgba(0, 0, 0, 0.85);
}

.avastar-latest-video__text {
	flex: 1 1 auto;
	min-width: 0;
	color: #fff;
}

.avastar-latest-video__label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	letter-spacing: 3px;
	text-transform: uppercase;
	opacity: 0.75;
}

.avastar-latest-video .avastar-latest-video__title {
	margin: 0 0 10px;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}

.avastar-latest-video .avastar-latest-video__desc {
	margin: 0;
	font-size: 17px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 991px) {
	.avastar-latest-video {
		flex-direction: column;
		text-align: center;
		gap: 12px;
		width: 472px;
	}

	.avastar-latest-video__thumb {
		flex-basis: auto;
		width: 100%;
	}
}

@media (max-width: 600px) {
	.avastar-latest-video .avastar-latest-video__title {
		font-size: 18px;
	}

	.avastar-latest-video .avastar-latest-video__desc {
		display: none;
	}
}

/* ---------- Popup ---------- */

.avastar-video-modal[hidden] {
	display: none;
}

.avastar-video-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.avastar-video-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
}

.avastar-video-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 960px;
	background: #111;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	outline: none;
}

.avastar-video-modal__close {
	position: absolute;
	top: -44px;
	right: 0;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 36px;
	line-height: 40px;
	cursor: pointer;
}

.avastar-video-modal__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 18px;
}

.avastar-video-modal .avastar-video-modal__title {
	margin: 0;
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
}

.avastar-video-modal .avastar-video-modal__all {
	flex: 0 0 auto;
	margin: 0;
	color: #fff;
	border-color: #fff;
	text-transform: uppercase;
}

@media (max-width: 600px) {
	.avastar-video-modal__footer {
		flex-direction: column;
		text-align: center;
	}
}

body.avastar-video-modal-open {
	overflow: hidden;
}
