/* === GLightbox core ======================================================= */
.glightbox-container {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999 !important;
  overflow: hidden;
  -ms-touch-action: none;
  touch-action: none;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  outline: 0;
}

.glightbox-container.inactive {
  display: none;
}

.glightbox-container .gcontainer {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow: hidden;
}

.glightbox-container .gslider {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex !important;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  transition: transform .4s ease;
  transform: translate3d(0, 0, 0);
}

.glightbox-container .gslide {
  position: absolute;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  opacity: 0;
}

.glightbox-container .gslide.current {
  position: relative;
  z-index: 99999;
  opacity: 1;
}

.glightbox-container .gslide.prev {
  z-index: 9999;
  opacity: 1;
}

.glightbox-container .gslide-inner-content {
  width: 100%;
}

.glightbox-container .ginner-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.glightbox-container .ginner-container.gvideo-container {
  width: 100%;
}

.gslide iframe,
.gslide video {
  border: none;
  outline: 0 !important;
  min-height: 165px;
  -webkit-overflow-scrolling: touch;
  touch-action: auto;
}

.gslide:not(.current) {
  pointer-events: none;
}

/* --- Image --------------------------------------------------------------- */
.gslide-image {
  display: flex;
  align-items: center;
}

.gslide-image img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: cover;
  user-select: none;
  margin: auto;
  padding: 0;
  border: none;
}

.desc-bottom .gslide-image img,
.desc-top .gslide-image img {
  width: auto;
}

.desc-left .gslide-image img,
.desc-right .gslide-image img {
  width: auto;
  max-width: 100%;
}

.gslide-image img.zoomable {
  position: relative;
}

.gslide-image img.dragging {
  cursor: grabbing !important;
  transition: none;
}

/* --- Video --------------------------------------------------------------- */
.gslide-video {
  position: relative;
  width: 100% !important;
  max-width: 100vh;
}

.gslide-video .plyr__poster-enabled.plyr--loading .plyr__poster {
  display: none;
}

.gslide-video::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 0, 0, .34);
  display: none;
}

.gslide-video.fullscreen {
  width: 100% !important;
  min-width: 100%;
  height: 75vh;
}

.gslide-video.fullscreen video {
  width: 100% !important;
  max-width: 100% !important;
}

/* --- Inline and external ------------------------------------------------- */
.gslide-inline {
  max-width: 100%;
  max-height: calc(100vh - 40px);
  margin: auto;
  overflow: auto;
  background: #fff;
  text-align: left;
}

.gslide-inline .ginlined-content {
  width: 100%;
  padding: 20px;
}

.gslide-external {
  width: 100%;
  min-width: 100%;
  max-height: 75vh;
  height: 100%;
  display: flex;
  background: #fff;
  overflow: auto;
  padding: 0;
}

/* --- Description blocks -------------------------------------------------- */
.gslide-description {
  position: relative;
  flex: 1 0 100%;
}

.gslide-description p {
  margin-bottom: 12px;
}

.gslide-description p:last-child {
  margin-bottom: 0;
}

/* Hide description when zoomed */
.zoomed .gslide-description {
  display: none;
}

/* --- Buttons ------------------------------------------------------------- */
.gclose,
.gnext,
.gprev {
  position: absolute;
  width: 26px;
  height: 44px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  border: none;
  z-index: 99999;
}

.gclose svg,
.gnext svg,
.gprev svg {
  width: 25px;
  height: auto;
}

.gclose.disabled,
.gnext.disabled,
.gprev.disabled {
  opacity: .1;
}

.gclose .garrow,
.gnext .garrow,
.gprev .garrow {
  stroke: #fff;
}

.gbtn.focused {
  outline: 2px solid #0f3d81;
}

/* --- Overlay & Loader ---------------------------------------------------- */
.goverlay {
  position: fixed;
  top: -1px;
  left: 0;
  width: 100%;
  height: calc(100vh + 1px);
  background: #000;
  will-change: opacity;
}

.gloader {
  position: absolute;
  top: 47%;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 25px;
  height: 25px;
  border: 2px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: lightboxLoader .8s infinite linear;
  z-index: 9999;
}

/* --- Animations ---------------------------------------------------------- */
@keyframes lightboxLoader {
  0% { transform: rotate(0); }
  100% { transform: rotate(360deg); }
}

@keyframes gfadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gfadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes gslideInLeft {
  from { opacity: 0; transform: translate3d(-60%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes gslideOutLeft {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(-60%, 0, 0); }
}

@keyframes gslideInRight {
  from { opacity: 0; transform: translate3d(60%, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes gslideOutRight {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to   { opacity: 0; transform: translate3d(60%, 0, 0); }
}

@keyframes gzoomIn {
  from { opacity: 0; transform: scale3d(.3, .3, .3); }
  to   { opacity: 1; }
}

@keyframes gzoomOut {
  from { opacity: 1; }
  50% { opacity: 0; transform: scale3d(.3, .3, .3); }
  to   { opacity: 0; }
}

/* --- Media queries ------------------------------------------------------- */
@media (min-width: 769px) {
  .glightbox-container .ginner-container {
    width: auto;
    height: auto;
    flex-direction: row;
  }

  .gslide-image img {
    max-width: 100%;
    max-height: 97vh;
  }

  .gslide-inline { max-height: 95vh; }
  .gslide-external { max-height: 100vh; }

  .gslide-description.description-left,
  .gslide-description.description-right {
    max-width: 275px;
  }

  .goverlay { background: rgba(0, 0, 0, .92); }
}

@media (min-width: 992px) {
  .glightbox-clean .gclose { right: 20px; opacity: .7; }
}

@media (max-height: 420px) {
  .goverlay { background: #000; }
}

/* === End GLightbox core ================================================== */
