/* Preload images */
body:after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  visibility: hidden;
  background: url(../img/close.png), url(../img/loading.gif), url(../img/prev.png), url(../img/next.png);
}

/* Lightbox Overlay */
.lightboxOverlay {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.8); /* Modern opacity handling */
  display: none;
}

/* Lightbox Container */
.lightbox {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 10000;
  text-align: center;
  line-height: 0;
  font-weight: normal;
}

/* Lightbox Image */
.lightbox .lb-image {
  display: block;
  height: auto;
  max-width: inherit;
  border-radius: 3px;
}

/* Remove Borders on Lightbox Images */
.lightbox a img {
  border: none;
}

/* Outer Container */
.lb-outerContainer {
  position: relative;
  background-color: white;
  width: 250px;
  height: 250px;
  margin: 0 auto;
  border-radius: 4px;
}

/* Clearfix for Outer Container */
.lb-outerContainer::after {
  content: "";
  display: table;
  clear: both;
}

/* Inner Container */
.lb-container {
  padding: 4px;
}

/* Loader */
.lb-loader {
  position: absolute;
  top: 43%;
  left: 0;
  height: 25%;
  width: 100%;
  text-align: center;
  line-height: 0;
}

/* Cancel Loader */
.lb-cancel {
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto;
  background: url(../img/loading.gif) no-repeat;
}

/* Navigation */
.lb-nav {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  z-index: 10;
}

.lb-container > .nav {
  left: 0;
}

/* Transparent Background for Navigation */
.lb-nav a {
  outline: none;
  background: transparent;
}

/* Previous & Next Buttons */
.lb-prev,
.lb-next {
  height: 100%;
  cursor: pointer;
  display: block;
}

/* Previous Button */
.lb-nav a.lb-prev {
  width: 34%;
  left: 0;
  float: left;
  background: url(../img/prev.png) left 48% no-repeat;
  opacity: 0;
  transition: opacity 0.6s;
}

/* Hover Effect */
.lb-nav a.lb-prev:hover {
  opacity: 1;
}

/* Next Button */
.lb-nav a.lb-next {
  width: 64%;
  right: 0;
  float: right;
  background: url(../img/next.png) right 48% no-repeat;
  opacity: 0;
  transition: opacity 0.6s;
}

/* Hover Effect */
.lb-nav a.lb-next:hover {
  opacity: 1;
}

/* Data Container */
.lb-dataContainer {
  margin: 0 auto;
  padding-top: 5px;
  width: 100%;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

/* Clearfix for Data Container */
.lb-dataContainer::after {
  content: "";
  display: table;
  clear: both;
}

/* Lightbox Data */
.lb-data {
  padding: 0 4px;
  color: #ccc;
}

/* Details Section */
.lb-data .lb-details {
  width: 85%;
  float: left;
  text-align: left;
  line-height: 1.1em;
}

/* Caption */
.lb-data .lb-caption {
  font-size: 13px;
  font-weight: normal;
  line-height: 1em;
  font-family: Arial, Helvetica, sans-serif;
}

/* Image Count */
.lb-data .lb-number {
  display: block;
  clear: left;
  padding-bottom: 1em;
  font-size: 11px;
  color: #999;
  font-family: Arial, Helvetica, sans-serif;
}

/* Close Button */
.lb-data {
  position: relative;
}

.lb-data .lb-close {
  position: absolute;
  top: -35px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: url(../img/close.png) top right no-repeat;
  text-align: right;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}

/* Close Button Hover */
.lb-data .lb-close:hover {
  cursor: pointer;
  opacity: 1;
}
