.gallery .wrap-grid {
  cursor: default;
}
.gallery .wrap-grid ul {
  width: 100%;
  margin: 0;
  padding: 3px;
  text-align: center;
  font-size: 0;
  line-height: 1em;
}
.gallery .wrap-grid li {
  display: inline-block;
  zoom: 1;
  *display: inline;
  list-style: none;
  margin: 3px;
  padding: 0;
  padding-bottom: 0px;
}
.gallery .thumbnails {
  position: relative;
  box-sizing: border-box;
  padding: 3px;
  user-select: none;
}
.gallery .thumbnails > li {
  margin: 3px;
  position: relative;
}
.gallery .thumbnails > li:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  border: 1px solid rgba(0, 0, 0, 0.125);
}
.gallery .thumbnails > li {
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.2, 1) 0.065s;
}
.gallery .thumbnails > li:hover {
  position: relative;
  z-index: 1000;
  /*transform: scale(1.1);*/
}
.gallery .thumbnails > li:hover:after {
  background-color: rgba(255, 255, 255, 0.5);
}
.thumbnails > li:hover:active {
  transform: scale(0.94);
  transition-delay: 0s;
}
@media screen and (max-width: 360px) {
  .gallery .thumbnails > li > img {
    width: 96px;
    height: 96px;
  }
}
.dimmed {
  overflow-y: scroll;
}
.dimmed * {
  user-select: none;
}
.gallery .background-dim {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: table;
  border-spacing: 0;
  background-color: #000;
  background-color: rgba(0, 0, 0, 0.75);
  /*background-color: rgba(255,255,255,0.75);*/
  transition-property: opacity, visibility;
  transition-duration: 0.25s;
  transition-timing-function: ease-out;
}
.gallery .background-dim[data-active="0"] {
  visibility: hidden;
  opacity: 0;
  transition-delay: 0.1s;
}
@keyframes loader {
  from {
    transform: scale(0);
    opacity: 1;
  }
  to {
    transform: scale(2);
    opacity: 0;
  }
}
.gallery[data-loading] .thumbnails:before, .gallery[data-loading] .thumbnails:after {
  content: "";
  position: absolute;
  z-index: 10000;
  width: 40px;
  height: 40px;
  top: 50%;
  left: 50%;
  margin-top: -20px;
  margin-left: -20px;
  background: #c80100;
  transform: scale(0);
  animation-name: loader;
  animation-duration: 0.75s;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
.gallery[data-loading] .thumbnails:after {
  animation-delay: 0.325s;
}
.gallery .image-positioner {
  display: table-cell;
  text-align: center;
  vertical-align: middle;
}
.gallery .image-container {
  display: inline-block;
  font-size: 0;
  position: relative;
  max-width: 1000px;
  background: none;
  box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
  /*border: 1px solid rgba(0,0,0,0.5);*/
  /*box-shadow: 0px 0px 1px rgba(0,0,0,0.75), 0px 3px 15px rgba(0,0,0,0.5);*/
  /*transform: perspective(1000);*/
  transition-property: opacity, transform;
  transition-duration: 0.25s;
  transition-delay: 0.1s;
  transition-timing-function: cubic-bezier(0.1, 0.8, 0.2, 1);
}
/*.gallery .image-container::after{
	pointer-events: none;
	content:"";
	display:block;
	position:absolute;
	top:0;
	left:0;
	bottom:0;
	right:0;

	border:1px solid rgba(255,255,255,0.125);
}*/
.gallery .image-container * {
  user-select: none;
}
.gallery .background-dim[data-active="0"] .image-container {
  opacity: 0;
  transform: scale(0);
  transition-delay: 0;
  transition-duration: 0.175s;
  transition-timing-function: cubic-bezier(0.6, 0, 0.9, 0.3);
}
.gallery .image-container .close-button {
  cursor: default;
  /*opacity: 0;*/
  display: block;
  position: absolute;
  z-index: 100;
  width: 21px;
  height: 21px;
  left: 0;
  top: 0;
  background-color: #AAA;
  background-color: rgba(255, 255, 255, 0.5);
  background-clip: padding-box;
  background-image: url(images/template/gallery-close.png);
  /*border-width: 0px 1px 1px 0px;
	border-width: 1px;
	border-color: rgba(0,0,0,0.6) rgba(0,0,0,0.6);
	border-style: solid;*/
  font-size: x-large;
  color: #FFF;
  /*transition: opacity 0.25s ease-out 1s;*/
}
/*.image-container:hover #close-button{
	opacity: 1;

	transition-delay: 0s;
}*/
.gallery .image-container .close-button:hover, .gallery .image-container .close-button:active {
  background-color: #CCC;
  background-color: rgba(255, 255, 255, 0.75);
  border-color: rgba(0, 0, 0, 0.4);
}
.gallery .image-container .close-button:hover:active {
  /*background-color: rgba(255,255,255,0.75);
	background-position: 0px -21px;
	border-color: rgba(0,0,0,0.25);*/
  background-color: #333;
  background-color: rgba(0, 0, 0, 0.5);
  background-position: 0px -21px;
  border-color: rgba(0, 0, 0, 0.9);
  color: #000;
}
/*.gallery .image-container .prev-button,
.gallery .image-container .next-button{
	display: block;
	position: absolute;
	bottom: 0;
	height: 60px;
	width:60px;

	background-color: rgba(255,255,255,0.5);

	font-size: xx-large;
}*/
.gallery .prev-button, .gallery .next-button {
  display: block;
  position: fixed;
  z-index: 1000;
  top: 56%;
  height: 60px;
  width: 60px;
  background-color: #AAA;
  background-color: rgba(255, 255, 255, 0.5);
  background-image: url(images/template/gallery-nav.png);
  transition-property: opacity, visibility, transform;
  transition-duration: 0.25s;
  transition-timing-function: cubic-bezier(0.1, 0.8, 0.2, 1);
}
.gallery .prev-button[disabled], .gallery .next-button[disabled] {
  opacity: 0.5;
  background-color: rgba(255, 255, 255, 0.25) !important;
  transition-property: opacity, visibility, transform, background-color;
}
.gallery[data-loading] .prev-button, .gallery[data-loading] .next-button {
  display: none;
}
.gallery .prev-button {
  left: 0;
}
.gallery .next-button {
  right: 0;
  background-position: -60px 0px;
}
.gallery .prev-button:hover, .gallery .next-button:hover, .gallery .prev-button:active, .gallery .next-button:active {
  background-color: #CCC;
  background-color: rgba(255, 255, 255, 0.75);
}
.gallery .prev-button:hover:active {
  background-color: #333;
  background-color: rgba(0, 0, 0, 0.5);
  background-position: 0px -60px;
}
.gallery .next-button:hover:active {
  background-color: #333;
  background-color: rgba(0, 0, 0, 0.5);
  background-position: -60px -60px;
}
.gallery .prev-button[disabled], .gallery .next-button[disabled] {
  display: none \9 ;
}
.gallery .background-dim[data-active="0"] .prev-button {
  transform: translateX(-100%);
}
.gallery .background-dim[data-active="0"] .next-button {
  transform: translateX(100%);
}
.gallery .image-display {
  width: 100%;
  height: auto;
  float: left;
  /*transition-property: opacity, transform;
	transition-duration: 0.25s;
	transition-delay: 0.1s;
	transition-timing-function: cubic-bezier(.1,.8,.2,1);*/
  box-shadow: inset 0px 0px 1px 1px rgba(255, 255, 255, 0.5);
}
.gallery [data-transition] {
  transition-delay: 0s;
  opacity: 0;
}
.gallery [data-transition="prev-out"], .gallery [data-transition="next-in"] {
  /*transform: perspective(1000) translateX(100%) translateZ(-1000px) rotateY(90deg);*/
  transform: translateX(100%);
}
.gallery [data-transition$="-in"] {
  transition: none !important;
}
.gallery [data-transition$="-out"] {
  transition-duration: 0.175s;
  transition-timing-function: ease, cubic-bezier(0.6, 0, 0.9, 0.3);
}
.gallery [data-transition="prev-in"], .gallery [data-transition="next-out"] {
  /*transform: perspective(1000) translateX(-100%) translateZ(-1000px) rotateY(-90deg);*/
  transform: translateX(-100%);
}
