/* ==========================================================================
   NATIVE DIALOG LIGHTBOX STYLES (Accessible, Modern Web Guidance compliant)
   ========================================================================== */

dialog.lightbox-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  background-color: transparent;
  border: none;
  padding: 0;
  overflow: visible;
  outline: none;
  display: none;
}

dialog.lightbox-modal[open] {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Modal Backdrop */
dialog.lightbox-modal::backdrop {
  background-color: rgba(15, 14, 13, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: lightbox-fade-in 220ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightbox-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 88vh;
  animation: lightbox-zoom-in 260ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lightbox-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-media-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background-color: #000000;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 88vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lightbox-caption-bar {
  margin-top: var(--space-md);
  background-color: rgba(28, 27, 26, 0.85);
  backdrop-filter: blur(4px);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  color: #FFFFFF;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 80vw;
}

/* Lightbox Navigation Buttons */
.lightbox-close-btn {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.08);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background-color: rgba(28, 27, 26, 0.7);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.lightbox-nav-btn:hover {
  background-color: rgba(200, 90, 50, 0.9);
  transform: translateY(-50%) scale(1.08);
}

.lightbox-prev-btn {
  left: -24px;
}

.lightbox-next-btn {
  right: -24px;
}

@media (max-width: 768px) {
  .lightbox-prev-btn { left: 8px; }
  .lightbox-next-btn { right: 8px; }
  .lightbox-close-btn { top: -42px; right: 8px; }
}
