/* 通用图片灯箱（点缩略图放大看）——监管页「人员头像」与录入页「拍照识别预览」共用一份。
   曾经这套样式挂在 me.css 里、类名叫 .ra-lightbox（ra = 最近活动），
   现在灯箱被拍照识别复用了，类名与文件都改成通用的。 */

.app-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; /* 缩放超出视口的图片，边界就是屏幕本身，而非某个更小的盒子 */
}
.app-lightbox[hidden] { display: none; }
.app-lightbox-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .86); }
.app-lightbox-stage {
  position: relative; z-index: 1; width: 100%; height: 100%;
  overflow: hidden; touch-action: none;
}
.app-lightbox-track { position: absolute; inset: 0; }
.app-lightbox-img {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; margin: auto;
  width: 100vw; height: auto; max-height: 100vh;
  object-fit: contain; border-radius: 0;
  transform-origin: center center; will-change: transform; user-select: none; -webkit-user-drag: none;
}
/* 共享元素过渡（View Transitions）：缩略图 ↔ 大图 morph，背景淡入淡出 */
::view-transition-old(app-lightbox-shared),
::view-transition-new(app-lightbox-shared) {
  animation-duration: .28s;
  animation-timing-function: cubic-bezier(.22, .61, .36, 1);
}
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .28s; }
.app-lightbox-btn {
  position: absolute; z-index: 2; display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(0,0,0, .14); color: #fff; backdrop-filter: blur(4px);
  transition: background .2s ease-in-out;
}
.app-lightbox-btn:hover { background: rgba(0,0,0, .26); }
.app-lightbox-close { top: 18px; right: 18px; }
.app-lightbox-nav { top: 50%; transform: translateY(-50%); }
.app-lightbox-prev { left: 18px; }
.app-lightbox-next { right: 18px; }
.app-lightbox-caption {
  position: absolute; z-index: 2; bottom: 22px; left: 50%; transform: translateX(-50%);
  padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .5);
  color: #fff; font-size: 13px; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis;
}
