#colorbox,
#cboxOverlay,
#cboxWrapper {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	max-width: 100%;
	max-height: 100%;
}

#cboxOverlay {
	position: fixed;
	width: 100%;
	height: 100%;
	background: #fff;
}

#cboxMiddleLeft,
#cboxBottomLeft {
	clear: left;
}

#cboxContent {
	position: relative;
	background: #fff;
	margin: 20px;
	border: 10px rgba(204, 204, 204, 0.5) solid;
	-moz-border-radius: 5px;
	-webkit-border-radius: 5px;
	border-radius: 5px;
	max-width: 95%;
	max-width: -webkit-calc(100vw - 60px);
	max-width: calc(100vw - 60px);
	max-height: 95%;
	max-height: -webkit-calc(100vh - 60px);
	max-height: calc(100vh - 60px);
}

#cboxLoadedContent {
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 95%;
	max-width: -webkit-calc(100vw - 60px);
	max-width: calc(100vw - 60px);
	max-height: 95%;
	max-height: -webkit-calc(100vh - 60px);
	max-height: calc(100vh - 60px);
	box-sizing: border-box !important;
}

#cboxLoadedContent > *:not(.cboxPhoto) {
	padding: 15px;
	box-sizing: border-box;
}

#cboxTitle {
	position: absolute;
	bottom: -35px;
	max-width: 80%;
	font-weight: bold;
}

#cboxLoadingOverlay,
#cboxLoadingGraphic {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

#cboxPrevious,
#cboxNext,
#cboxClose,
#cboxSlideshow {
	cursor: pointer;
}

.cboxPhoto {
	float: left;
	border: 0;
	display: block;
	max-width: none;
	-ms-interpolation-mode: bicubic;
	margin: auto;
}

.cboxIframe {
	width: 100%;
	height: 100%;
	display: block;
	border: 0;
	background: #fff;
}

#colorbox,
#cboxContent,
#cboxLoadedContent {
	box-sizing: content-box;
}

#cboxTopLeft,
#cboxTopCenter,
#cboxTopRight,
#cboxBottomLeft,
#cboxBottomCenter,
#cboxBottomRight,
#cboxMiddleLeft,
#cboxMiddleRight {
	display: none;
}

#cboxError {
	border: 1px solid rgba(204, 204, 204, 0.5);
	padding: 50px;
}

#cboxCurrent {
	position: absolute;
	right: 0;
	bottom: -35px;
}

#cboxLoadingOverlay:after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -1.25rem;
	margin-top: -1.25rem;
	background-color: #fff;
	height: 2.5rem;
	width: 2.5rem;
	animation: infinite-spinning 1s infinite linear;
	border-radius: 50%;
	border-width: 5px;
	border-color: var(--elgg-border-color-highlight) var(--elgg-border-color-soft) var(--elgg-border-color-soft);
	border-style: solid;
	display: block;
}

#cboxPrevious,
#cboxNext,
#cboxSlideshow,
#cboxClose {
	border: 0;
	overflow: visible;
	width: auto;
	background: none;
	margin: 0;
	padding: 0;
}

#cboxSlideshow {
	position: absolute;
	bottom: 0;
	right: 42px;
	color: #2d3047;
}

#cboxClose, #cboxPrevious, #cboxNext {
	position: absolute;
	width: 22px;
	height: 22px;
	font-size: 12px;
	line-height: 12px;
	top: 50%;
	-moz-border-radius: 1000px;
	-webkit-border-radius: 1000px;
	border-radius: 1000px;
	background: #000;
	color: #fff;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
}

#cboxPrevious {
	left: 0;
	margin-left: -15px;
	top: 50%;
	margin-top: -13px;
}

#cboxNext {
	right: 0;
	margin-right: -15px;
	top: 50%;
	margin-top: -13px;
}

#cboxClose {
	top: 0;
	right: 0;
	margin: -15px;
}

#colorbox,
#cboxPrevious:active,
#cboxNext:active,
#cboxSlideshow:active,
#cboxClose:active {
	outline: 0;
}
