/* lightbox.css -- OCA Team Dashboard v2
   Fullscreen image lightbox overlay.
   Cream backdrop matches v2 light-mode surface. No em-dashes.
*/

/* ---- Overlay shell ---- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(244, 241, 233, 0.92); /* --bg at 92% opacity */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightbox-fade-in 0.14s ease;
  cursor: zoom-out;
}

html[data-theme="dark"] .lightbox-overlay {
  background: rgba(15, 19, 24, 0.92);
}

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

/* ---- Backdrop layer (separate click target) ---- */
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* ---- Inner container (image + caption) ---- */
.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 80px);
  cursor: default;
  animation: lightbox-scale-in 0.16s ease;
}

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

/* ---- Image ---- */
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  border-radius: 10px;
  box-shadow: var(--shadow-pop);
  object-fit: contain;
  cursor: default;
}

/* ---- Caption ---- */
.lightbox-caption {
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: 13px;
  color: var(--ink-2);
  text-align: center;
  max-width: 480px;
  line-height: 1.5;
}

/* ---- Close button ---- */
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-strong);
  background: var(--surface-0);
  color: var(--ink-2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  transition: background 0.1s, color 0.1s;
}

.lightbox-close:hover {
  background: var(--hover-strong);
  color: var(--ink-1);
}
