/* src/css/post-lightbox.css */
:root {
  --post-lightbox-bg: rgba(0, 0, 0, 0.95);
  --post-lightbox-text: #ffffff;
  --post-lightbox-text-secondary: rgba(255, 255, 255, 0.75);
  --post-lightbox-btn-bg: rgba(255, 255, 255, 0.15);
  --post-lightbox-btn-hover-bg: rgba(255, 255, 255, 0.25);
}
.post-content img[data-lightbox-trigger] {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.post-content img[data-lightbox-trigger]:hover {
  opacity: 0.92;
}
.post-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--post-lightbox-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}
.post-lightbox.active {
  opacity: 1;
  visibility: visible;
}
.post-lightbox-image-wrapper {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-lightbox img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  transition: transform 0.1s ease-out;
  cursor: default;
}
.post-lightbox img[style*="scale(1)"],
.post-lightbox img:not([style*=scale]) {
  cursor: default;
}
.post-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--post-lightbox-btn-bg);
  border: none;
  border-radius: 50%;
  color: var(--post-lightbox-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
}
.post-lightbox-close:hover {
  background: var(--post-lightbox-btn-hover-bg);
  transform: scale(1.05);
}
.post-lightbox-close svg {
  width: 20px;
  height: 20px;
}
.post-lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: var(--post-lightbox-btn-bg);
  border: none;
  border-radius: 50%;
  color: var(--post-lightbox-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  z-index: 10;
}
.post-lightbox:hover .post-lightbox-nav {
  opacity: 1;
}
.post-lightbox-nav:hover {
  background: var(--post-lightbox-btn-hover-bg);
}
.post-lightbox-nav.prev {
  left: 24px;
}
.post-lightbox-nav.next {
  right: 24px;
}
.post-lightbox-nav svg {
  width: 24px;
  height: 24px;
}
.post-lightbox-nav[hidden] {
  display: none !important;
}
.post-lightbox-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.8) 0%,
      transparent 100%);
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.post-lightbox.active .post-lightbox-info {
  transform: translateY(0);
}
.post-lightbox-caption {
  color: var(--post-lightbox-text);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.post-lightbox-counter {
  color: var(--post-lightbox-text-secondary);
  font-size: 0.875rem;
}
@media (max-width: 768px) {
  .post-lightbox-nav {
    display: none;
  }
  .post-lightbox-close {
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
  .post-lightbox-info {
    padding: 1.5rem;
  }
}
