.ffvg-shell,
.ffvg-shell * {
	box-sizing: border-box;
}

.ffvg-shell {
	position: relative;
	left: 50%;
	width: 100vw;
	margin-left: -50vw;
	background: #000;
}

.ffvg-shell--framed .ffvg-grid {
	max-width: var(--ffvg-max-width, 1186px);
	margin-right: auto;
	margin-left: auto;
}

.ffvg-grid {
	display: grid;
	grid-template-columns: repeat(var(--ffvg-columns, 2), minmax(0, 1fr));
	gap: var(--ffvg-gap, 0px);
	width: 100%;
}

.ffvg-card {
	position: relative;
	min-width: 0;
	margin: 0;
	background: #111;
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.ffvg-card__button {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #111;
	color: #fff;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

.ffvg-card__media,
.ffvg-card__media img,
.ffvg-card__shade {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.ffvg-card__media img {
	display: block;
	object-fit: cover;
	transform: scale(var(--ffvg-poster-scale, 1));
}

.ffvg-card__media {
	transition: transform 450ms ease;
}

.ffvg-card__shade {
	background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.02) 55%);
	opacity: 0;
	transition: opacity 250ms ease;
}

.ffvg-card__title {
	position: absolute;
	left: clamp(18px, 3vw, 34px);
	right: clamp(18px, 3vw, 34px);
	bottom: clamp(18px, 3vw, 30px);
	z-index: 2;
	color: #fff;
	font-family: var(--ffvg-title-font, inherit);
	font-size: var(--ffvg-title-size, 22px);
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 250ms ease, transform 250ms ease;
	pointer-events: none;
}

.ffvg-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 72px;
	height: 72px;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.ffvg-card__play::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 54%;
	width: 0;
	height: 0;
	border-top: 21px solid transparent;
	border-bottom: 21px solid transparent;
	border-left: 32px solid rgba(255, 255, 255, 0.72);
	transform: translate(-42%, -50%);
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.22));
}

.ffvg-card__button:hover .ffvg-card__media,
.ffvg-card__button:focus-visible .ffvg-card__media {
	transform: scale(1.025);
}

.ffvg-card__button:hover .ffvg-card__shade,
.ffvg-card__button:focus-visible .ffvg-card__shade {
	opacity: 0.8;
}

.ffvg-card__button:hover .ffvg-card__title,
.ffvg-card__button:focus-visible .ffvg-card__title {
	opacity: 1;
	transform: translateY(0);
}

.ffvg-card__button:focus-visible {
	outline: 3px solid #fff;
	outline-offset: -5px;
}

body.ffvg-modal-open {
	overflow: hidden;
}

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

.ffvg-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: clamp(18px, 4vw, 60px);
}

.ffvg-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
}

.ffvg-modal__panel {
	position: relative;
	z-index: 1;
	width: min(1200px, 100%);
	max-height: 100%;
}

.ffvg-modal__video {
	display: block;
	width: 100%;
	max-height: calc(100vh - 150px);
	background: #000;
	aspect-ratio: 16 / 9;
}

.ffvg-modal__close {
	position: absolute;
	top: -46px;
	right: -6px;
	z-index: 2;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font: 300 42px/1 Arial, sans-serif;
	cursor: pointer;
}

.ffvg-modal__close:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	.ffvg-grid {
		grid-template-columns: 1fr;
	}

	.ffvg-card__play {
		width: 64px;
		height: 64px;
	}

	.ffvg-modal {
		padding: 56px 12px 20px;
	}

	.ffvg-modal__video {
		max-height: calc(100vh - 120px);
	}
}

@media (hover: none) {
	.ffvg-card__shade {
		opacity: 0.8;
	}

	.ffvg-card__title {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ffvg-card__media,
	.ffvg-card__shade,
	.ffvg-card__title {
		transition: none;
	}
}
