/* CSS :target lightbox — iOS/Yandex safe (absolute layout, no % height traps) */
.pdp-live-lb {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  display: none;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  height: 100dvh;
  background: #0c1014;
  overflow: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

.pdp-live-lb:target {
  display: block;
}

body:has(.pdp-live-lb:target) {
  overflow: hidden;
}

body:has(.pdp-live-lb:target) .mobile-header,
body:has(.pdp-live-lb:target) header.app-topbar,
body:has(.pdp-live-lb:target) .mobile-bottom-nav,
body:has(.pdp-live-lb:target) .bottom-nav,
body:has(.pdp-live-lb:target) .floating-buybar {
  visibility: hidden !important;
  pointer-events: none !important;
}

.pdp-live-lb__dismiss {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: block;
}

.pdp-live-lb__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  box-sizing: border-box;
}

.pdp-live-lb__close,
.pdp-live-lb__nav {
  position: absolute;
  z-index: 5;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.pdp-live-lb__close {
  z-index: 8;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: 12px;
}

.pdp-live-lb__nav {
  top: 50%;
  margin-top: -22px;
  font-size: 30px;
}

.pdp-live-lb__nav.is-prev {
  left: 10px;
}

.pdp-live-lb__nav.is-next {
  right: 10px;
}

.pdp-live-lb__stage {
  position: absolute;
  z-index: 3;
  top: calc(52px + env(safe-area-inset-top, 0px));
  right: 12px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  box-sizing: border-box;
  background: #151a1f;
  overflow: hidden;
  touch-action: none;
}

.pdp-live-lb__stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.pdp-live-lb__counter {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 50%;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  padding: 6px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
}

/* Shared strip: one DOM copy for all slides (shown while any lightbox is open) */
.pdp-live-lb__thumbs.is-shared {
  display: none;
  position: fixed;
  z-index: 2147483001;
}

body:has(.pdp-live-lb:target) .pdp-live-lb__thumbs.is-shared {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
}

.pdp-live-lb__thumbs {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 8px;
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pdp-live-lb__thumbs::-webkit-scrollbar {
  display: none;
}

.pdp-live-lb__thumb {
  box-sizing: border-box;
  -webkit-flex: 0 0 56px;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  display: block;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  background: #fff;
  opacity: 0.8;
}

.pdp-live-lb__thumb.is-active {
  opacity: 1;
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(10, 99, 216, 0.7);
}

.pdp-live-lb__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

@media (min-width: 768px) {
  .pdp-live-lb__stage {
    top: 64px;
    right: 72px;
    bottom: 120px;
    left: 72px;
  }

  .pdp-live-lb__nav {
    width: 48px;
    height: 48px;
    margin-top: -24px;
  }

  .pdp-live-lb__nav.is-prev {
    left: 18px;
  }

  .pdp-live-lb__nav.is-next {
    right: 18px;
  }

  .pdp-live-lb__thumb {
    -webkit-flex-basis: 64px;
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }
}
