/* Shared lightbox / media-popup performance
   Kills expensive hover zooms (zoom-in cursor + scale) that hitch on large images. */

.thumb.lb,
.frame.lb,
.workcard .thumb.lb,
.creative .frame.lb,
.workshow .creative .frame.lb,
.filmstage .frame.lb,
.menustage.lb,
a.go.lb,
.ad[data-ad-video],
.ad[data-ad-image],
[data-type="video"].lb,
[data-video].lb,
.lb[role="button"]{
  cursor:pointer !important;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

.thumb.lb img,
.frame.lb img,
.workcard .thumb.lb img,
.creative .frame.lb img,
.workshow .creative .frame.lb img,
.filmstage .frame.lb img,
.ad img,
.menustage.lb img{
  transition:none !important;
  transform:none !important;
  will-change:auto !important;
  backface-visibility:hidden;
}

.thumb.lb:hover img,
.frame.lb:hover img,
.workcard .thumb.lb:hover img,
.creative .frame.lb:hover img,
.workshow .creative .frame.lb:hover img,
.filmstage .frame.lb:hover img,
.ad:hover img,
.menustage.lb:hover img,
.workshow figure:hover img{
  transform:none !important;
}

/* Keep lightbox layers composited; avoid layout thrash while open */
#lbx,
#adlb,
#lightbox,
#fbx,
.emlbx,
.sw-lb,
.lbx{
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
  contain:layout style;
}

#lbx.on,
#lbx.open,
#adlb.on,
#lightbox.on,
#lightbox.open,
.emlbx-open #lightbox,
body.lb-lock #lbx,
body.lbx-lock #lbx,
html.lb-lock #lbx,
html.lbx-lock #lbx{
  contain:strict;
}

#lbx img,
#lbx video,
#adlb img,
#adlb video,
#lightbox img,
#lightbox video,
.lbbody img,
.lbbody video,
.lbstage img,
.lbstage video{
  max-width:100%;
  height:auto;
  transform:translateZ(0);
  backface-visibility:hidden;
}

@media (prefers-reduced-motion:reduce){
  .thumb.lb img,
  .frame.lb img,
  .ad img{
    transition:none !important;
    transform:none !important;
  }
}
