/* Background overlay */
.lightboxOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9990;
  display: none;
}

/* Lightbox container */
.lightbox {
  position: fixed;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  display: none;
}

/* Image wrapper */
.lb-outerContainer {
  position: relative;
  background: #000;
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
  overflow: visible !important; /* IMPORTANT FIX */
}

/* Image */
.lb-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* Caption */
.lb-caption {
  color: #fff;
  margin-top: 10px;
  text-align: center;
}

/* ========================
   BUTTONS — MUST WORK NOW
   ======================== */

/* Close button */
.lb-close {
  width: 50px;
  height: 50px;
  background-image: url("../images/close.svg");
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  top: -50px;     /* Position ABOVE image frame */
  right: -50px;
  cursor: pointer;
  z-index: 10001;
  opacity: 1 !important;
}

/* Previous button */
.lb-prev {
  width: 50px;
  height: 50px;
  background-image: url("../images/previous.svg");
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  left: 100px;     /* Position LEFT outside frame */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10001;
  opacity: 1 !important;
}

/* Next button */
.lb-next {
  width: 50px;
  height: 50px;
  background-image: url("../images/next.svg");
  background-size: contain;
  background-repeat: no-repeat;
  position: absolute;
  right: -70px;    /* Position RIGHT outside frame */
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10001;
  opacity: 1 !important;
}

.lb-previous:hover,
.lb-next:hover,
.lb-close:hover {
  opacity: 0.8;
}
/* FORCE BUTTONS TO BE VISIBLE */
.lb-prev, .lb-next, .lb-close {
    position: absolute !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    display: block !important;
    opacity: 1 !important;
    z-index: 999999 !important;
}

/* Next button (RIGHT SIDE) */
.lb-next {
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%);
}

/* Previous button (LEFT SIDE) */
.lb-previous {
    left: 10px !important;
    top: 50% !important;
    transform: translateY(-50%);
}

/* Close button (TOP RIGHT) */
.lb-close {
    right: 10px !important;
    top: 10px !important;
}
