/**
 * KoreAves — Shared Media Lightbox Stylesheet
 * Accessible modal image viewer with contain-fit presentation and provenance metadata.
 */

.ka-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(15, 20, 18, 0.88);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 16px) env(safe-area-inset-right, 16px) env(safe-area-inset-bottom, 16px) env(safe-area-inset-left, 16px);
  box-sizing: border-box;
  animation: ka-lightbox-fade-in 0.15s ease-out;
}

.ka-lightbox-native {
  inset: 0;
  margin: 0;
  max-width: none;
  max-height: none;
  border: 0;
}

.ka-lightbox-native::backdrop {
  background: transparent;
}

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

.ka-lightbox-dialog {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: #1b2420;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.ka-lightbox-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  transition: background 0.12s ease, transform 0.12s ease;
}

.ka-lightbox-close-btn:hover {
  background: rgba(0, 0, 0, 0.85);
  transform: scale(1.05);
}

.ka-lightbox-close-btn:focus-visible {
  outline: 2px solid #58b88d;
  outline-offset: 2px;
}

.ka-lightbox-image-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d1210;
  overflow: hidden;
  min-height: 200px;
}

.ka-lightbox-image {
  max-width: 88vw;
  max-height: 74vh;
  max-height: 74dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ka-lightbox-caption-bar {
  padding: 12px 18px;
  background: #1b2420;
  color: #e5eae6;
  font-family: var(--ka-font-hangul-sans, sans-serif);
  font-size: 13px;
  line-height: 1.4;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ka-lightbox-caption-text {
  font-weight: 500;
  margin-bottom: 4px;
}

.ka-lightbox-attribution {
  font-size: 11.5px;
  color: #9ab0a2;
}

.ka-lightbox-attribution a {
  color: #72cf9f;
  text-decoration: underline;
}
