/* src/components/LightboxModal.css */
.lightbox-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050;
  cursor: pointer;
  padding: 20px;
  box-sizing: border-box;
  opacity: 0;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  backdrop-filter: blur(0px);
}

.lightbox-backdrop.active {
  background-color: rgba(0, 0, 0, 0.85);
  opacity: 1;
  backdrop-filter: blur(3px);
}

.lightbox-content {
  position: relative;
  background-color: transparent;
  padding: 0;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: default;
  transform: scale(0.95);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
  overflow: hidden;
}

.lightbox-content.active {
  transform: scale(1);
  opacity: 1;
}

.lightbox-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.3s ease;
}

.lightbox-image.active {
  transform: scale(1);
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(40, 40, 40, 0.85);
  color: white;
  border: none;
  border-radius: 30px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  z-index: 1051;
  transition: all 0.2s ease;
  transform: scale(1);
  opacity: 0.9;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  font-weight: 500;
}

.close-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-text {
  margin-top: 1px;
}

.lightbox-close:hover {
  background-color: rgba(60, 60, 60, 1);
  transform: scale(1.05);
  opacity: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.lightbox-close:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.lightbox-controls {
  display: flex;
  justify-content: center;
  margin-top: 12px;
  width: 100%;
}

.lightbox-counter {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  padding: 4px 12px;
  border-radius: 20px;
  background-color: rgba(30, 30, 30, 0.6);
}

/* Optional loading animation */
@keyframes pulse {
  0% { opacity: 0.6; }
  50% { opacity: 0.8; }
  100% { opacity: 0.6; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95vw;
  }
  
  .lightbox-backdrop {
    padding: 10px;
  }
  
  .lightbox-close {
    top: 10px;
    right: 10px;
    background-color: rgba(20, 20, 20, 0.9);
  }
}

/* Add a subtle pulsing effect to the close button for extra visibility */
@keyframes subtle-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.lightbox-content.active .lightbox-close {
  animation: subtle-pulse 2s ease-in-out 1;
}