/* =========================================================
   LIGHTBOX GLOBAL
========================================================= */

body.lightbox-open {
  overflow:
    hidden;
}


/* =========================================================
   ZOOMABLE IMAGE
========================================================= */

.zoomable-image {
  cursor:
    zoom-in;

  user-select:
    none;

  -webkit-user-select:
    none;

  -webkit-user-drag:
    none;
}


/* =========================================================
   LIGHTBOX BACKDROP
========================================================= */

.image-lightbox {
  position:
    fixed;

  inset:
    0;

  z-index:
    99999;

  display:
    none;

  align-items:
    center;

  justify-content:
    center;

  background:
    rgba(4, 4, 7, .96);

  backdrop-filter:
    blur(14px);

  -webkit-backdrop-filter:
    blur(14px);
}


.image-lightbox.active {
  display:
    flex;
}


/* =========================================================
   LIGHTBOX STAGE
========================================================= */

.lightbox-stage {
  position:
    relative;

  width:
    min(
      92vw,
      1650px
    );

  height:
    88vh;

  display:
    flex;

  align-items:
    center;

  justify-content:
    center;
}


/* =========================================================
   FULL IMAGE
========================================================= */

.lightbox-image {
  width:
    auto;

  max-width:
    100%;

  height:
    auto;

  max-height:
    100%;

  object-fit:
    contain;

  pointer-events:
    none;

  user-select:
    none;

  -webkit-user-select:
    none;

  -webkit-user-drag:
    none;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.lightbox-close {
  position:
    absolute;

  top:
    24px;

  right:
    28px;

  z-index:
    10;

  width:
    50px;

  height:
    50px;

  padding:
    0;

  display:
    grid;

  place-items:
    center;

  border:
    1px solid rgba(255,255,255,.2);

  border-radius:
    50%;

  background:
    rgba(15,15,18,.88);

  color:
    white;

  cursor:
    pointer;

  font-family:
    "DM Sans",
    sans-serif;

  font-size:
    1.6rem;

  line-height:
    1;

  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease,
    border-color .2s ease;
}


.lightbox-close:hover {
  background:
    var(--red);

  border-color:
    var(--red);

  transform:
    rotate(6deg);
}


/* =========================================================
   LIGHTBOX NAVIGATION
========================================================= */

.lightbox-nav {
  position:
    absolute;

  top:
    50%;

  z-index:
    10;

  width:
    54px;

  height:
    54px;

  margin-top:
    -27px;

  padding:
    0;

  display:
    grid;

  place-items:
    center;

  border:
    1px solid rgba(255,255,255,.2);

  border-radius:
    50%;

  background:
    rgba(15,15,18,.88);

  color:
    white;

  cursor:
    pointer;

  font-size:
    1.1rem;

  transition:
    background .2s ease,
    color .2s ease,
    transform .2s ease,
    border-color .2s ease;
}


.lightbox-prev {
  left:
    28px;
}


.lightbox-next {
  right:
    28px;
}


.lightbox-nav:hover {
  background:
    var(--lime);

  border-color:
    var(--lime);

  color:
    #111;

  transform:
    scale(1.08);
}


/* =========================================================
   LIGHTBOX COUNTER
========================================================= */

.lightbox-counter {
  position:
    absolute;

  left:
    50%;

  bottom:
    22px;

  transform:
    translateX(-50%);

  color:
    rgba(255,255,255,.68);

  font-family:
    "Fira Code",
    monospace;

  font-size:
    .7rem;

  letter-spacing:
    .08em;
}


/* =========================================================
   TABLET
========================================================= */

@media(max-width: 900px) {

  .lightbox-stage {
    width:
      90vw;

    height:
      84vh;
  }


  .lightbox-prev {
    left:
      18px;
  }


  .lightbox-next {
    right:
      18px;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media(max-width: 700px) {

  .lightbox-stage {
    width:
      100vw;

    height:
      82vh;

    padding:
      18px;
  }


  .lightbox-close {
    top:
      14px;

    right:
      14px;

    width:
      44px;

    height:
      44px;

    font-size:
      1.4rem;
  }


  .lightbox-prev {
    left:
      10px;
  }


  .lightbox-next {
    right:
      10px;
  }


  .lightbox-nav {
    width:
      44px;

    height:
      44px;

    margin-top:
      -22px;

    background:
      rgba(15,15,18,.82);

    backdrop-filter:
      blur(8px);

    -webkit-backdrop-filter:
      blur(8px);
  }


  .lightbox-counter {
    bottom:
      16px;

    font-size:
      .62rem;
  }

}