#lightbox {
	opacity: 0;
	pointer-events: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 0;
	overflow: hidden;
	background-color: #000100;
	background-color: rgba(0,0,0,0.85);
	z-index: 10;
}

#lightbox .loading {
	position: fixed;
	top: 40%;
	left: 0;
	color: #fff;
	z-index: 3;
	font-size: 2.5em;
	padding: .5em;
	width: 100%;
	opacity: 0;
	transition: opacity .1s;
	pointer-events: none;
}

#lightbox.changing #img-box,#lightbox.changing #prev,#lightbox.changing #next {
	opacity: 0 !important;
}

#lightbox.changing .loading {
	opacity: 1;
}

#lightbox button {
	pointer-events: none;
}

#lightbox.active {
	height: 100%;
	opacity: 1;
	pointer-events: auto;
}

#lightbox.active button {
	pointer-events: auto;
}

#lightbox .image {
	text-align: center;
	height: 100%;
}

#lightbox .image #img-box {
	display: inline-block;
	max-width: 98%;
	max-height: 80%;
	width: auto;
	height: auto;
	vertical-align: middle;
	position: relative;
	opacity: 1;
	transition: opacity .2s;
}

#lightbox .image #img-box #photo {
	display: block;
	height: auto;
	max-height: 100%;
	width: auto;
	box-shadow: 0 0 1em rgba(0,0,0,0.8);
	pointer-events: none;
	margin: 0 auto;
	text-align: center;
}

#lightbox .image #img-box .caption {
	text-align: left;
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	padding: .5em;
	background-color: #000100;
	background-color: rgba(0,0,0,0.8);
	color: #fff;
}

#lightbox .image #next,#lightbox .image #prev {
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 50%;
	background: none;
	text-align: left;
	border: none;
	outline: none;
	opacity: 0;
	transition: opacity .2s;
	cursor: pointer;
}

#lightbox .image #next:hover,#lightbox .image #prev:hover,#lightbox .image #next:focus,#lightbox .image #prev:focus {
	opacity: 1;
}

#lightbox .image #next img,#lightbox .image #prev img {
	width: 5em;
	height: auto;
}

#lightbox .image #next {
	left: 50%;
	text-align: right;
}

#lightbox .image #close {
	padding: .25em 1em;
	font-size: 100%;
	position: absolute;
	top: 1.5em;
	right: 1em;
	background-color: #000100;
	background: transparent;
	color: #fff;
	border: 1px solid #fff;
	border-radius: 2px;
	cursor: pointer;
}

#lightbox .image #close:hover,#lightbox .image #close:focus {
	background-color: #fff;
	color: #000100;
}

#lightbox .image .height {
	vertical-align: middle;
	display: inline-block;
	height: 100%;
	width: .001%;
}


.ios #lightbox .image #close {
	top: .5rem;
	right: .5rem;
}

.ios #lightbox .image #next,
.ios #lightbox .image #prev {
	opacity: 1;
}

.ios #lightbox .image #next img,
.ios #lightbox .image #prev img {
	display: none;
}

.ios #lightbox .image #next span.hidden,
.ios #lightbox .image #prev span.hidden {
	position: static;
	left: 0;
	width: auto;
	height: auto;
	overflow: auto;
	margin: 0;
	padding: 0;
	clip: none;
	border: 0;
}

@media screen and (max-width: 48em) {

	#lightbox {
		font-size: 2vw;
	}

	#lightbox .image #close {
		top: .5em;
		right: .5em;
	}

	#lightbox .image #next,#lightbox .image #prev {
		opacity: .8;
	}

	#lightbox .image #next img,#lightbox .image #prev img {
		width: 3em;
	}
}

@media screen and (max-width: 31.25em) {

	#lightbox {
		font-size: 3.5vw;
	}

	#lightbox .image #img-box .caption {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		font-size: 150%;
	}
}