/* ========================================================
   Emerald Meadows Lightbox & Media Protection Styles
   ======================================================== */

/* --- Lightbox overlay --- */
#em_lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}
#em_lightbox.em_lightbox_active {
  display: flex;
}

#em_lightbox_backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
  animation: em_lb_fadein 0.22s ease;
}

#em_lightbox_content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: em_lb_scalein 0.22s ease;
  /* Pass pointer events to backdrop so click-outside closes */
  pointer-events: none;
}

#em_lightbox_img {
  display: block;
  max-width: 90vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.75);
  border: 2px solid rgba(255, 255, 255, 0.12);
  /* Fully block pointer events — prevents right-click, drag, screenshot via browser */
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

#em_lightbox_close {
  pointer-events: auto;
  position: absolute;
  top: -44px;
  right: -4px;
  background: none;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  transition: opacity 0.18s, background 0.18s;
}
#em_lightbox_close:hover,
#em_lightbox_close:focus {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
}

/* --- Lightbox keyboard hint label --- */
#em_lightbox_hint {
  pointer-events: none;
  position: absolute;
  bottom: -32px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

/* --- Animations --- */
@keyframes em_lb_fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes em_lb_scalein {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* --- Global media protection --- */
/* Prevent drag on all images site-wide */
img {
  -webkit-user-drag: none;
  -moz-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
video {
  -webkit-user-drag: none;
  user-select: none;
}

/* Zoom cursor on lightbox-wired images */
img.em-lightbox-ready {
  cursor: zoom-in !important;
}
