/* Shared lightbox styles - used by aaronspindler and photonfolio album detail */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  transition: opacity 0.3s ease;
}

.lightbox-video {
  width: min(90vw, 960px);
  aspect-ratio: 16 / 9;
}

.lightbox-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.lightbox-caption {
  color: white;
  text-align: center;
  padding: 10px;
  font-size: 0.9em;
}

.lightbox-exif {
  position: absolute;
  bottom: 60px;
  left: 20px;
  color: white;
  background: rgba(0, 0, 0, 0.7);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.8em;
  backdrop-filter: blur(10px);
  max-width: 400px;
}

.exif-row {
  display: flex;
  gap: 15px;
  margin-bottom: 4px;
}

.exif-row:last-child {
  margin-bottom: 0;
}

.exif-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.exif-label {
  opacity: 0.7;
  font-size: 0.9em;
}

.exif-value {
  font-weight: 500;
}

.ai-caption-row {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ai-caption .exif-value {
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.lightbox-close:hover {
  color: #ddd;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
  padding: 10px;
  user-select: none;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-download {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid white;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s;
}

.lightbox-download:hover {
  background: rgba(0, 0, 0, 0.9);
}

.lightbox {
  touch-action: pan-y pinch-zoom;
}

.lightbox-content {
  touch-action: pan-y pinch-zoom;
  will-change: transform;
}

@media (max-width: 768px) {
  .lightbox-nav {
    font-size: 24px;
    padding: 20px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
    font-size: 32px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .lightbox-exif {
    bottom: 80px;
    left: 10px;
    right: 10px;
    max-width: none;
    font-size: 0.75em;
  }

  .lightbox-download {
    bottom: 15px;
    right: 10px;
    padding: 8px 16px;
    font-size: 13px;
  }
}

.swipe-hint {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

@media (pointer: coarse) {
  .swipe-hint {
    animation: fadeHint 3s ease-out forwards;
    animation-delay: 1s;
  }
}

@keyframes fadeHint {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
