/* SiteAdmin: click-to-enlarge and photo protection notice (shared by all themes). */
/* ===== Click-to-enlarge (lightbox) ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.lightbox.open { display: flex; }
/* The photo and its caption. A "table" layout keeps the caption exactly
   as wide as the photo and works reliably in Safari. */
.lightbox figure {
  display: table;
  margin: 0;
}
.lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 84vh;
  min-width: 120px;
  min-height: 80px;
}
.lightbox figcaption {
  display: table-caption;
  caption-side: bottom;
  padding-top: 0.6rem;
  font-size: 0.85rem;
  overflow: hidden;
}
.lightbox .title { float: left; color: #ddd; max-width: calc(100% - 5rem); line-height: 1.4; }
.lightbox .count { float: right; color: #888; white-space: nowrap; }
.lightbox button {
  position: absolute;
  background: none;
  border: none;
  color: #ccc;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem;
  line-height: 1;
  z-index: 1;
}
.lightbox button:hover { color: #fff; }
.lightbox .close { top: 0.5rem; right: 1rem; }
/* Same height as the close button, content centred, so the two line up */
.lightbox .play  { top: 0.5rem; right: 4.5rem; height: 4.5rem; padding: 0 1rem; display: flex; align-items: center;
                   font-size: 1.4rem; letter-spacing: -0.15em; }
.lightbox .play[hidden] { display: none; }
.lightbox img.fade-in { animation: photoFade 0.5s ease; }
@keyframes photoFade { from { opacity: 0.15; } to { opacity: 1; } }
.lightbox .prev  { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox .next  { right: 0.5rem; top: 50%; transform: translateY(-50%); }

/* ===== Photo protection notice ===== */
img.protected {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* stops the iPhone "Save to Photos" long-press menu */
  -webkit-user-drag: none;
}
.protect-note {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translate(-50%, 1rem);
  max-width: min(92vw, 560px);
  background: rgba(20,24,30,0.96);
  border: 1px solid #333;
  border-radius: 6px;
  padding: 0.8rem 1.2rem;
  font-size: 0.9rem;
  color: #eee;
  display: flex;
  gap: 1rem;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 200;
}
.protect-note.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.protect-note a { color: #8fb3d6; white-space: nowrap; }

