/* Custom GLightbox styling for Café Marjanneke */

/* Fix arrow positioning - ensure they stay visible and centered */
.glightbox-container .gnext,
.glightbox-container .gprev {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(85, 123, 87, 0.8) !important;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 99999 !important;
}

.glightbox-container .gnext:hover,
.glightbox-container .gprev:hover {
  background: rgba(85, 123, 87, 1) !important;
  transform: translateY(-50%) scale(1.1) !important;
}

/* Left arrow - always at left edge */
.glightbox-container .gprev {
  left: 20px !important;
  right: auto !important;
}

/* Right arrow - always at right edge */
.glightbox-container .gnext {
  right: 20px !important;
  left: auto !important;
}

/* Close button - circular background matching arrow style */
.glightbox-container .gclose {
  background: rgba(85, 123, 87, 0.7) !important;
  width: 35px !important;
  height: 35px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease;
  padding: 0 !important;
  top: 15px !important;  /* Move it higher - was default positioning */
}

.glightbox-container .gclose:hover {
  background: rgba(85, 123, 87, 1) !important;
  transform: scale(1.1) !important;
}

/* Style the close icon itself */
.glightbox-container .gclose svg {
  width: 18px !important;
  height: 18px !important;
  stroke: white !important;
  stroke-width: 2 !important;
  fill: none !important;
}

.glightbox-container .gclose:hover svg {
  stroke: white !important;
}

/* Image counter */
.glightbox-container .gslide-description {
  background: rgba(0, 0, 0, 0.8);
  padding: 15px 20px;
  border-radius: 5px;
}

/* Number counter for many images */
.glightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(85, 123, 87, 0.9);
  color: white;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 99999;
  pointer-events: none;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.1s ease;
}

/* Dot indicators for few images */
.glightbox-dots {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 99999;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.glightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.glightbox-dot.active {
  background: rgba(85, 123, 87, 1);
  width: 24px;
  border-radius: 4px;
}

/* Hide indicators immediately when lightbox is closing */
.glightbox-container.glightbox-closing .glightbox-counter,
.glightbox-container.glightbox-closing .glightbox-dots {
  opacity: 0 !important;
  transition: opacity 0.05s ease !important;
}

/* Zoom indicator */
.glightbox-container .zoomed .gslide-image img {
  cursor: grab;
}

.glightbox-container .zoomed .gslide-image img:active {
  cursor: grabbing;
}

/* Mobile adjustments - smaller arrows but still visible */
@media (max-width: 768px) {
  .glightbox-container .gnext,
  .glightbox-container .gprev {
    width: 45px;
    height: 45px;
  }
  
  .glightbox-container .gprev {
    left: 10px !important;
  }
  
  .glightbox-container .gnext {
    right: 10px !important;
  }
  
  .glightbox-container .gclose {
    width: 32px !important;
    height: 32px !important;
    top: 12px !important;  /* Slightly higher on tablet */
  }
  
  .glightbox-container .gclose svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  /* Counter adjustments */
  .glightbox-counter {
    bottom: 15px;
    padding: 6px 16px;
    font-size: 13px;
  }
  
  .glightbox-dots {
    bottom: 15px;
    gap: 8px;
  }
  
  .glightbox-dot {
    width: 7px;
    height: 7px;
  }
  
  .glightbox-dot.active {
    width: 20px;
  }
}

/* Extra small screens - even smaller arrows */
@media (max-width: 480px) {
  .glightbox-container .gnext,
  .glightbox-container .gprev {
    width: 40px;
    height: 40px;
  }
  
  .glightbox-container .gprev {
    left: 5px !important;
  }
  
  .glightbox-container .gnext {
    right: 5px !important;
  }
  
  .glightbox-container .gclose {
    width: 30px !important;
    height: 30px !important;
    top: 10px !important;  /* Higher on mobile */
  }
  
  .glightbox-container .gclose svg {
    width: 14px !important;
    height: 14px !important;
  }
  
  /* Counter adjustments */
  .glightbox-counter {
    bottom: 10px;
    padding: 5px 12px;
    font-size: 12px;
  }
  
  .glightbox-dots {
    bottom: 10px;
    gap: 6px;
  }
  
  .glightbox-dot {
    width: 6px;
    height: 6px;
  }
  
  .glightbox-dot.active {
    width: 18px;
  }
}

/* Prevent arrows from wrapping or repositioning */
.glightbox-container .gnext svg,
.glightbox-container .gprev svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Prevent layout shift - always reserve space for scrollbar */
html {
  overflow-y: scroll !important;
}

body {
  overflow-x: hidden;
}

/* When lightbox opens, prevent body scroll but don't change padding */
body.glightbox-open {
  overflow: hidden !important;
  padding-right: 0 !important;
  margin-right: 0 !important;
}

/* Ensure these elements don't shift - but keep them visible */
#mainNav,
.page-watermark,
.scroll-top-btn {
  transition: none !important;
}

/* Fix z-index layering */
.glightbox-container {
  z-index: 999999 !important;
}

.goverlay {
  z-index: 1 !important; /* Overlay should be behind the content */
}

.gslide,
.gslide-inner-content,
.gnext,
.gprev,
.gclose {
  z-index: 10 !important; /* Images and controls on top */
}