/* ==========================================================================
   Theme Built-in Lightbox Styles
   ========================================================================== */

#theme-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

#theme-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

#theme-lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#theme-lightbox-overlay.active #theme-lightbox-container {
  transform: scale(1);
}

#theme-lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: block;
  user-select: none;
}

#theme-lightbox-caption {
  color: #ffffff;
  font-size: 14px;
  margin-top: 12px;
  text-align: center;
  max-width: 90vw;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

#theme-lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 28px;
  line-height: 32px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.8;
}

#theme-lightbox-close:hover {
  opacity: 1;
  transform: scale(1.15);
}

#theme-lightbox-prev,
#theme-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  border: none;
  width: 44px;
  height: 60px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.2s ease, opacity 0.2s ease;
  z-index: 1000000;
  opacity: 0.8;
}

#theme-lightbox-prev:hover,
#theme-lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
}

#theme-lightbox-prev {
  left: 15px;
}

#theme-lightbox-next {
  right: 15px;
}

@media (max-width: 600px) {
  #theme-lightbox-prev,
  #theme-lightbox-next {
    width: 36px;
    height: 48px;
    font-size: 18px;
  }
}
