/* Hide scrollbars if lightbox is displayed */
.tobi--is-open {
  overflow-y: hidden;
}


/* Thumbnail */
.tobi.tobi--zoom {
  border: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  display: inline-block;
  position: relative;
  text-decoration: none;
}

.tobi.tobi--zoom img {
  display: block;
}

.tobi .tobi__zoom-icon {
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  background-color: #9bb3cd;
  bottom: 0;
  color: #fff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  height: 1.333em;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 0;
  width: 1.333em;
  font-size: 1.3em;
  font-weight: 700;
}

.tobi:hover .tobi__zoom-icon {
  background-color: #ff1d8e;
}


/* Overlay */
.tobi-overlay {
  background-color: rgba(0, 0, 0, 0.8);
  bottom: 0;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  font-size: 18px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 26529;
  overflow: hidden;
}

  .tobi-overlay *,
  .tobi-overlay *::before,
  .tobi-overlay *::after {
    -webkit-box-sizing: inherit;
    box-sizing: inherit;
  }

  .tobi-overlay[aria-hidden="true"] {
    display: none;
  }


/* Slider */
.tobi-overlay .tobi-slider {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  -webkit-transition: -webkit-transform .3s linear;
  transition: -webkit-transform .3s linear;
  transition: transform .3s linear;
  transition: transform .3s linear, -webkit-transform .3s linear;
  white-space: nowrap;
}

.tobi-overlay .tobi-slide {
  display: inline-block;
  height: 100%;
  position: relative;
  width: 100%;
}


/* Figure */
.tobi-overlay .tobi-figure-wrapper {
  -ms-flex-align: center;
  -webkit-box-align: center;
  align-items: center;
  bottom: 0;
  display: -ms-flexbox;
  display: -webkit-box;
  display: flex;
  -ms-flex-pack: center;
  -webkit-box-pack: center;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.tobi-overlay figure {
  margin: 0;
  position: relative;
}

  .tobi-overlay img {
    display: block;
    height: auto;
    max-height: 85vh;
    max-width: 85vw;
    width: auto;
  }

  .tobi-overlay figcaption {
    background-color: rgba(0, 0, 0, 0.8);
    bottom: 0;
    color: #fff;
    display: block;
    left: 0;
    padding-bottom: .25em;
    padding-left: .5em;
    padding-right: .5em;
    padding-top: .25em;
    position: absolute;
    white-space: pre-wrap;
    width: 100%;
  }


/* Buttons */
.tobi-overlay button {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  font-size: 1.6em;
  height: 1.6em;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  position: absolute;
  text-align: center;
  width: 1.6em;
}

  .tobi-overlay button:focus {
    border: 1px solid #fff;
    outline: 0;
  }

  .tobi-overlay button:disabled {
    display: none;
  }

  .tobi-overlay button[aria-label="Previous"],
  .tobi-overlay button[aria-label="Next"] {
    top: 50%;
    top: calc(50% - (1.6em / 2));
  }

    .tobi-overlay button[aria-label="Previous"] {
      left: 2%;
    }

    .tobi-overlay button[aria-label="Next"] {
      right: 2%;
    }

  .tobi-overlay button[aria-label="Close"] {
    right: 2%;
    top: 1em;
  }


/* Counter */
.tobi-overlay .tobi-counter {
  background-color: transparent;
  color: #fff;
  font-size: 1.15em;
  left: 2%;
  position: absolute;
  top: 1em;
}


/* Loader */
.tobi-overlay .tobi-loader {
  display: inline-block;
  height: 5em;
  left: 50%;
  margin-left: -2.5em;
  margin-top: -2.5em;
  position: absolute;
  top: 50%;
  width: 5em;
}

.tobi-overlay .tobi-loader::before {
  -webkit-animation: spin 1s infinite;
  animation: spin 1s infinite;
  border-radius: 100%;
  border-top-color: #0079c1;
  border: .5em solid #f2f2f2;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

@-webkit-keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}