/**
 * Libervoy 通用大图预览（无依赖）
 * 资源：{$global_res_host}mod/libervoy-photo-lightbox/
 */
.lv-plb {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.92);
  color: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.lv-plb[hidden] {
  display: none !important;
}

.lv-plb__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lv-plb__close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top, 0px));
  right: max(0.75rem, env(safe-area-inset-right, 0px));
  z-index: 4;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.lv-plb__close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.lv-plb__close::before,
.lv-plb__close::after {
  content: '';
  position: absolute;
  width: 1.1rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.lv-plb__close::before {
  transform: rotate(45deg);
}

.lv-plb__close::after {
  transform: rotate(-45deg);
}

.lv-plb__counter {
  position: absolute;
  top: max(0.85rem, env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  opacity: 0.85;
  pointer-events: none;
}

.lv-plb__stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.lv-plb__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.lv-plb__slide {
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lv-plb__frame {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: grab;
}

.lv-plb__frame.is-grabbing {
  cursor: grabbing;
}

.lv-plb__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
  -webkit-user-drag: none;
}

.lv-plb__img.is-loading {
  opacity: 0.35;
}

.lv-plb__hint {
  position: absolute;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  z-index: 2;
  transform: translateX(-50%);
  font-size: 0.75rem;
  opacity: 0.55;
  pointer-events: none;
  white-space: nowrap;
}

html.lv-plb-open,
html.lv-plb-open body {
  overflow: hidden !important;
}
