#photoViewControls {
	opacity: 1;
	transition: opacity 0.5s ease-in-out;
}
#photoViewControls A {
	margin: 1em;
	padding: 0.5em;
	border-radius: 50%;

	width: 2em;
	height: 2em;
	
	color: black;
	text-align: center;
	text-decoration: none;
	background-color: #F0F0F0;
	z-index: 100;
}
#photoViewControls A:hover {
	background-color: #D0D0D0
}

#photoViewControls .touchArea, .gallClose {
	position: absolute;
}
#photoViewControls div.touchArea {
	height: 100%;
	width: 4em;
}
#photoView A.gallClose {
	top: 0%;
	right: 0%;
	margin: 1em;
	z-index: 256;
}

/* Link inside touch area */
#photoView .touchArea A {
	position: fixed;
	top: 45%
}
#photoView .gallPrev {
	left: 0%;
}
#photoView .gallNext {
	right: 0%;
}

#photoView DIV.previews {
	position: absolute;
	bottom: 1em;
	width: 100%;
	text-align: center;
}

#photoView img.preview {
	position: relative;
	transform: none;
	left: auto;
	width: 4em;
	height: 4em;
	object-fit: cover; /* Makes square without stretch */
	border-style: solid;
	border-position: inline;
	border-color: #0D0D0D;
}

#gallery {
	text-align: center;
	width: 100%
}
#gallery img {
	display: inline-block;
	width: 30%;
	min-width: 100px;
	vertical-align: middle;
}

/* Phone screen size */
@media only screen and (max-width: 549px) {
	#gallery img {
		width: 47%;
		min-width: auto;
	}
}