.vbox-overlay *, .vbox-overlay *:before, .vbox-overlay *:after {
  -webkit-backface-visibility: hidden;
  box-sizing: border-box;
}

.vbox-overlay * {
  backface-visibility: visible;
}

.vbox-overlay {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 999999;
}

.vbox-share, .vbox-title {
  line-height: 1;
  position: fixed;
  z-index: 98;
  text-align: center;
  margin: 0 auto;
  color: var(--vbox-tools-color);
}

.vbox-title {
  font-size: 12px;
  background-color: var(--vbox-title-background);
  width: var(--vbox-title-width);
  border-radius: var(--vbox-title-radius);
  padding: 12px 54px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.vbox-share {
  font-size: 24px;
  padding: 0 0.35em;
  background-color: var(--vbox-share-background);
  width: var(--vbox-share-width);
  border-radius: var(--vbox-share-radius);
}

.vbox-link-btn,
button.vbox-link-btn,
button.vbox-link-btn:hover,
button.vbox-link-btn:active,
button.vbox-link-btn:focus {
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  color: inherit !important;
  padding: 6px 12px;
  outline: none;
  display: inline-block;
  cursor: pointer;
}

.vbox-share a {
  color: inherit !important;
  padding: 6px 12px;
  display: inline-block;
}

.vbox-share svg {
  z-index: 10;
  vertical-align: middle;
}

/* ----- navigation ----- */
.vbox-close {
  cursor: pointer;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 99;
  padding: 6px 15px;
  color: #000;
  color: var(--vbox-tools-color);
  border: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.vbox-close:hover {
  opacity: 1;
}

.vbox-left-corner {
  cursor: pointer;
  position: fixed;
  left: 0;
  top: 0;
  overflow: hidden;
  line-height: 1;
  font-size: 12px;
  z-index: 99;
  display: flex;
  align-items: center;
  color: var(--vbox-tools-color);
}

.vbox-num {
  display: inline-block;
  padding: 12px 15px;
}

/* ----- Social share ----- */
.vbox-left {
  left: 0;
}

.vbox-right {
  right: 0;
}

.vbox-top {
  top: 0;
}

.vbox-bottom {
  bottom: 0;
}

/* ----- Navigation arrows ----- */
.vbox-next, .vbox-prev {
  position: fixed;
  top: 50%;
  margin-top: -15px;
  overflow: hidden;
  cursor: pointer;
  display: block;
  width: 45px;
  height: 45px;
  z-index: 99;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.vbox-next:hover, .vbox-prev:hover {
  opacity: 1;
}

.vbox-next span, .vbox-prev span {
  position: relative;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: var(--vbox-tools-color);
  border-right-color: var(--vbox-tools-color);
  text-indent: -100px;
  position: absolute;
  top: 8px;
  display: block;
}

.vbox-prev {
  left: 15px;
}

.vbox-next {
  right: 15px;
}

.vbox-prev span {
  left: 10px;
  transform: rotate(-135deg);
}

.vbox-next span {
  transform: rotate(45deg);
  right: 10px;
}

.vbox-open {
  overflow: hidden;
}

.vbox-container {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  overflow-scrolling: touch;
  -webkit-overflow-scrolling: touch;
  z-index: 20;
  max-height: 100%;
  padding: 30px 0px;
}

.vbox-content {
  opacity: 0;
  text-align: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  padding: 0 4%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.vbox-container img {
  max-width: 100%;
  height: auto;
}

.vbox-child {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
  max-width: var(--vbox-max-width);
  text-align: initial;
  padding: var(--vbox-padding);
}

.vbox-child img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -o-user-select: none;
  user-select: none;
  display: block;
}

.vbox-fit .vbox-child img,
.vbox-fit .vbox-child.venoratio {
  max-height: calc(100vh - 60px);
}

/* ----- Aspect ratio ----- */
.venoratio, .vbox-inline {
  position: relative;
  width: 100%;
  margin: 0 auto;
  background-color: #000 !important;
}

.venoratio::before {
  display: block;
  padding-top: var(--vb-aspect-ratio);
  content: "";
}

.venoratio > * {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: var(--vbox-padding);
}

.venoratio-1x1 {
  --vb-aspect-ratio: 100%;
  max-width: min(var(--vbox-max-width), 100vh - 60px);
}

.venoratio-4x3.vbox-child.venoratio {
  --vb-aspect-ratio: calc(3 / 4 * 100%);
  max-width: min(var(--vbox-max-width), (100vh - 60px) * 4 / 3);
}

.venoratio-16x9.vbox-child.venoratio {
  --vb-aspect-ratio: calc(9 / 16 * 100%);
  max-width: min(var(--vbox-max-width), (100vh - 60px) * 16 / 9);
}

.venoratio-21x9.vbox-child.venoratio {
  --vb-aspect-ratio: calc(9 / 21 * 100%);
  max-width: min(var(--vbox-max-width), (100vh - 60px) * 21 / 9);
}

.venoratio-full {
  --vb-aspect-ratio: calc(100vh - 60px);
}

.vbox-grab .vbox-child img {
  cursor: grab;
}

.vbox-child > iframe {
  border: none !important;
}

.vbox-content.swipe-left {
  margin-left: -200px !important;
}

.vbox-content.swipe-right {
  margin-left: 200px !important;
}

.vbox-preloader {
  transform: translateZ(0);
}

.vbox-preloader .vbox-preloader-inner {
  opacity: 1;
  transition: opacity 200ms;
}

.vbox-hidden {
  display: none;
}

.vbox-preloader.vbox-hidden .vbox-preloader-inner {
  opacity: 0;
}

.vbox-backdrop {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(-1px);
  z-index: 0;
}

.vbox-tooltip {
  position: relative;
  display: inline-block;
}

.vbox-tooltip .vbox-tooltip-text {
  visibility: hidden;
  color: #fff;
  text-align: center;
  padding: 0;
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 0;
  opacity: 0;
  transition: opacity 0.3s;
  margin-bottom: 2px;
  font-family: sans-serif;
}

.vbox-top .vbox-tooltip .vbox-tooltip-text {
  bottom: auto;
  top: 100%;
  margin-bottom: 0;
  margin-top: 2px;
}

.vbox-tooltip-inner {
  padding: 5px 10px;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 6px;
  font-size: 10px;
}

.vbox-tooltip:hover .vbox-tooltip-text {
  visibility: visible;
  opacity: 1;
}
