/* ============================================
   WordPress Gallery Lightbox Styles
   gallery-lightbox.css
   ============================================ */

#gallery-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}

#gallery-lightbox-overlay.active {
  display: flex;
  opacity: 1;
}

#gallery-lightbox {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 80px 80px;
  box-sizing: border-box;
}

/* ---- Image wrapper ---- */
#glb-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  overflow: hidden;
}

#glb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 60px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s ease;
  display: block;
}

#glb-img.loading {
  opacity: 0;
}

/* ---- Buttons ---- */
#glb-close,
#glb-prev,
#glb-next {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
  line-height: 1;
  flex-shrink: 0;
}

#glb-close:hover,
#glb-prev:hover,
#glb-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.08);
}

#glb-close:focus-visible,
#glb-prev:focus-visible,
#glb-next:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Close button — top right corner */
#glb-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  font-size: 22px;
  z-index: 10;
}

/* Prev / Next */
#glb-prev,
#glb-next {
  width: 48px;
  height: 48px;
  font-size: 20px;
  margin: 0 12px;
  position: relative;
  z-index: 10;
}

/* ---- Footer bar ---- */
#glb-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 100%);
  pointer-events: none;
}

#glb-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  font-family: inherit;
  margin: 0;
  max-width: 70%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#glb-counter {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-family: inherit;
  white-space: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  #gallery-lightbox {
    padding: 50px 12px 60px;
  }

  #glb-prev,
  #glb-next {
    width: 38px;
    height: 38px;
    font-size: 16px;
    margin: 0 6px;
  }

  #glb-caption {
    font-size: 12px;
    max-width: 60%;
  }
}
