/* Lightbox for images in post and page content (see lightbox.js). */

.oxtalk-lightbox {
	max-width: 95vw;
	max-height: 95vh;
	margin: auto; /* The theme's global reset sets margin: 0, which stops the dialog centring. */
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

.oxtalk-lightbox::backdrop {
	background: rgba( 0, 0, 0, 0.85 );
}

.oxtalk-lightbox figure {
	margin: 0;
}

.oxtalk-lightbox img {
	display: block;
	width: auto;
	height: auto;
	max-width: 95vw;
	max-height: 85vh;
	margin: 0 auto;
	background: #fff;
}

.oxtalk-lightbox figcaption {
	max-width: 60em;
	margin: 0.75em auto 0;
	color: #fff;
	text-align: center;
}

.oxtalk-lightbox-close {
	position: fixed;
	top: 0.5rem;
	right: 0.5rem;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #000;
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
}

.oxtalk-lightbox-close svg {
	display: block;
}

.oxtalk-lightbox-close:hover,
.oxtalk-lightbox-close:focus-visible {
	background: #fff;
	color: #000;
	outline: 3px solid #fc0;
	outline-offset: 2px;
}

@media ( prefers-reduced-motion: no-preference ) {

	.oxtalk-lightbox[open],
	.oxtalk-lightbox[open]::backdrop {
		animation: oxtalk-lightbox-fade 0.2s ease-out;
	}

}

@keyframes oxtalk-lightbox-fade {
	from {
		opacity: 0;
	}
}
