/**
 * Unit image lightbox + clickable unit names in AF3 shortcodes units table.
 */

.af3-shortcodes-single-units-component-body a.gc-unit-image-link {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
	cursor: pointer;
}

.af3-shortcodes-single-units-component-body a.gc-unit-image-link:hover,
.af3-shortcodes-single-units-component-body a.gc-unit-image-link:focus {
	text-decoration-thickness: 2px;
}

.gc-unit-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
}

.gc-unit-lightbox.is-open {
	display: flex;
}

.gc-unit-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 24, 28, 0.85);
	border: 0;
	padding: 0;
	cursor: pointer;
}

.gc-unit-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: min(960px, 100%);
	max-height: 100%;
	outline: none;
}

.gc-unit-lightbox__figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
	max-height: calc(100vh - 6rem);
}

.gc-unit-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: calc(100vh - 8rem);
	width: auto;
	height: auto;
	object-fit: contain;
	background: #fff;
}

.gc-unit-lightbox__caption {
	margin-top: 0.75rem;
	color: #fff;
	font-size: 0.95rem;
	text-align: center;
}

.gc-unit-lightbox__close,
.gc-unit-lightbox__nav {
	position: absolute;
	appearance: none;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	line-height: 1;
	transition: background 0.15s ease;
}

.gc-unit-lightbox__close:hover,
.gc-unit-lightbox__nav:hover,
.gc-unit-lightbox__close:focus-visible,
.gc-unit-lightbox__nav:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.gc-unit-lightbox__close {
	top: 1rem;
	right: 1rem;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	font-size: 1.75rem;
	z-index: 2;
}

.gc-unit-lightbox__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	font-size: 1.75rem;
}

.gc-unit-lightbox__nav--prev {
	left: 0.75rem;
}

.gc-unit-lightbox__nav--next {
	right: 0.75rem;
}

.gc-unit-lightbox__nav[hidden] {
	display: none;
}

@media (max-width: 640px) {
	.gc-unit-lightbox {
		padding: 0.75rem;
	}

	.gc-unit-lightbox__nav--prev {
		left: 0.25rem;
	}

	.gc-unit-lightbox__nav--next {
		right: 0.25rem;
	}
}
