:root {
	--eba-fsm-overlay-bg: rgba(0, 0, 0, 0.8);
	--eba-fsm-close-color: #ffffff;
	--eba-fsm-caption-color: #ffffff;
}

.eba-fullscreen-media {
	position: relative;
	display: block;
}

.eba-fullscreen-media__trigger {
	all: unset;
	display: block;
	width: 100%;
	cursor: zoom-in;
	position: relative;
}

.eba-fullscreen-media__trigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.eba-fullscreen-media__thumbnail {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 16px;
	background-color: #000000;
}

.eba-fullscreen-media--aspect-auto .eba-fullscreen-media__thumbnail > *,
.eba-fullscreen-media--aspect-auto .eba-fullscreen-media__thumbnail {
	aspect-ratio: auto;
}

.eba-fullscreen-media--aspect-1-1 .eba-fullscreen-media__thumbnail,
.eba-fullscreen-media--aspect-1-1 .eba-fullscreen-media__thumbnail > * {
	aspect-ratio: 1 / 1;
}

.eba-fullscreen-media--aspect-4-3 .eba-fullscreen-media__thumbnail,
.eba-fullscreen-media--aspect-4-3 .eba-fullscreen-media__thumbnail > * {
	aspect-ratio: 4 / 3;
}

.eba-fullscreen-media--aspect-16-9 .eba-fullscreen-media__thumbnail,
.eba-fullscreen-media--aspect-16-9 .eba-fullscreen-media__thumbnail > * {
	aspect-ratio: 16 / 9;
}

.eba-fullscreen-media--aspect-21-9 .eba-fullscreen-media__thumbnail,
.eba-fullscreen-media--aspect-21-9 .eba-fullscreen-media__thumbnail > * {
	aspect-ratio: 21 / 9;
}

.eba-fullscreen-media__thumbnail img,
.eba-fullscreen-media__thumbnail video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.eba-fullscreen-media__thumbnail video {
	filter: brightness(0.92);
}

.eba-fullscreen-media__caption {
	margin-top: 8px;
	display: inline-block;
	font-size: 0.875rem;
	color: var(--eba-fsm-caption-color);
}

.eba-fullscreen-media__overlay {
	position: fixed;
	inset: 0;
	background-color: var(--eba-fsm-overlay-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 180ms ease, visibility 180ms ease;
	z-index: 9990;
	padding: clamp(16px, 4vw, 48px);
}

.eba-fullscreen-media--is-open .eba-fullscreen-media__overlay {
	opacity: 1;
	visibility: visible;
}

.eba-fullscreen-media__overlay-inner {
	position: relative;
	width: min(90vw, 1280px);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.eba-fullscreen-media__close {
	position: absolute;
	top: -48px;
	right: -8px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid rgba(255, 255, 255, 0.35);
	color: var(--eba-fsm-close-color);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 120ms ease, transform 120ms ease;
}

.eba-fullscreen-media__close:hover,
.eba-fullscreen-media__close:focus-visible {
	background: rgba(0, 0, 0, 0.55);
	transform: scale(1.04);
	outline: none;
}

.eba-fullscreen-media__content {
	position: relative;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}

.eba-fullscreen-media__content img,
.eba-fullscreen-media__content video {
	width: 100%;
	max-height: 75vh;
	object-fit: contain;
	border-radius: 20px;
	background: #000000;
}

.eba-fullscreen-media__video-player {
	background: #000000;
}

.eba-fullscreen-media__caption--overlay {
	color: var(--eba-fsm-caption-color);
	text-align: center;
	font-size: 0.95rem;
}

@media (max-width: 768px) {
	.eba-fullscreen-media__overlay-inner {
		width: 100%;
	}

	.eba-fullscreen-media__close {
		top: 12px;
		right: 12px;
		background: rgba(0, 0, 0, 0.5);
	}
}

@supports not (aspect-ratio: 1 / 1) {
	.eba-fullscreen-media__thumbnail {
		padding-top: 56.25%;
		position: relative;
	}

	.eba-fullscreen-media__thumbnail > * {
		position: absolute;
		inset: 0;
	}
}
