/* Link */
.tobi--zoom {
  border: 0;
  -webkit-box-shadow: none;
          box-shadow: none;
  display: block;
  position: relative;
  text-decoration: none;
}

.tobi--zoom img {
  display: block;
}

.tobi__zoom-icon {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background-color: #0437fd;
  bottom: 0;
  color: #fff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  line-height: 1;
  position: absolute;
  right: 0;
}

.tobi__zoom-icon svg {
  height: 1.111em;
  padding-bottom: .222em;
  padding-left: .222em;
  padding-right: .222em;
  padding-top: .222em;
  pointer-events: none;
  width: 1.111em;
}

/* Hide scrollbars if lightbox is displayed */
.tobi--is-open {
  overflow-y: hidden;
}

/* Overlay */
.tobi-overlay {
  background-color: rgba(0, 0, 0, 0.8);
  bottom: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  contain: strict;
  font-size: 18px;
  left: 0;
  overflow: hidden;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1337;
}

.tobi-overlay[aria-hidden="true"] {
  display: none;
}

.tobi-overlay *,
.tobi-overlay *::before,
.tobi-overlay *::after {
  -webkit-box-sizing: inherit;
          box-sizing: inherit;
}

/* Slider */
.tobi-slider {
  bottom: 0;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  transition: -webkit-transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), -webkit-transform 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  white-space: nowrap;
  will-change: transform;
}

.tobi-slide {
  display: inline-block;
  height: 100%;
  position: relative;
  width: 100%;
}

/* Figure */
.tobi-figure-wrapper {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  bottom: 0;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.tobi-figure-wrapper figure {
  margin: 0;
  max-width: 100%;
  position: relative;
}

.tobi-figure-wrapper figure > * {
  max-height: 85vh;
  max-width: 85vw;
}

.tobi-figure-wrapper img {
  display: block;
  height: auto;
  max-height: 85vh;
  max-width: 85vw;
  width: auto;
}

.tobi-figure-wrapper iframe {
  height: 85vh;
  width: 85vw;
}

.tobi-figure-wrapper video {
  max-height: 85vh;
  max-width: 85vw;
}

.tobi-figure-wrapper 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 {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-color: transparent;
  border: .056em solid transparent;
  color: #fff;
  cursor: pointer;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font: inherit;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  line-height: 1;
  margin: 0;
  opacity: .5;
  padding-top: .222em;
  padding-left: .222em;
  padding-right: .222em;
  padding-bottom: .222em;
  position: absolute;
  -webkit-transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity;
}

.tobi-overlay button svg {
  pointer-events: none;
}

.tobi-overlay button:hover {
  opacity: 1;
  -webkit-transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity;
}

.tobi-overlay button:disabled {
  display: none;
}

.tobi-overlay button[aria-label="Previous"], .tobi-overlay button[aria-label="Next"] {
  top: 50%;
  top: calc(50% - (4em / 2));
}

.tobi-overlay button[aria-label="Previous"] svg, .tobi-overlay button[aria-label="Next"] svg {
  height: 4em;
  width: 4em;
}

.tobi-overlay button[aria-label="Previous"] {
  left: 0;
}

.tobi-overlay button[aria-label="Next"] {
  right: 0;
}

.tobi-overlay button[aria-label="Close"] {
  right: 1em;
  top: 1em;
}

.tobi-overlay button[aria-label="Close"] svg {
  height: 2em;
  width: 2em;
}

.tobi-overlay button[aria-hidden="true"] {
  display: none;
}

/* Counter */
.tobi-counter {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  background-color: transparent;
  color: #fff;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  font-size: 1.111em;
  height: 2em;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  left: 1em;
  position: absolute;
  top: 1em;
}

.tobi-counter[aria-hidden="true"] {
  display: none;
}

/* Loader */
.tobi-loader {
  display: inline-block;
  height: 5em;
  left: 50%;
  margin-left: -2.5em;
  margin-top: -2.5em;
  position: absolute;
  top: 50%;
  width: 5em;
}

.tobi-loader::before {
  -webkit-animation: spin 1s infinite;
          animation: spin 1s infinite;
  border-radius: 100%;
  border: .5em solid #f2f2f2;
  border-top-color: #0437fd;
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  will-change: transform;
  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);
  }
}
