/* ============================================================================
   video-nudge-append.css
   ----------------------------------------------------------------------------
   Video nudge support for the offer page. Loaded AFTER offering.css, which is
   not modified by this file.

   VideoBlockView emits the offsets as custom properties -- --op-video-dx and
   --op-video-dy -- and adds the op-video--nudged class only when one of them is
   non-zero. The transform lives here rather than inline so the containment rules
   below can sit alongside it.

   Why containment is needed at all: a transform does not affect layout, but it
   does still count toward the page's scrollable width. A video nudged sideways
   therefore makes the document wider than the viewport, and a phone renders the
   whole page at that width and clips it. Clipping the containers stops that, so
   the nudge works at every width instead of being switched off on mobile.

   overflow-x: clip rather than hidden -- hidden creates a scroll container and
   breaks position: sticky on descendants, which the tab strip relies on.

   Scoped to op-video--nudged rather than op-video on purpose: translate(0, 0) is
   still a transform, and applying it to every video would give each one a
   stacking context and containing block that the sandboxed document frame and
   the poster overlay do not expect.
   ============================================================================ */


/* ---- the nudge itself: applies at every viewport width ---- */

.op-video--nudged {
    transform: translate(var(--op-video-dx, 0px), var(--op-video-dy, 0px));
}


/* ---- containment ----
   Every container a nudged video can sit in. Clipping here keeps a sideways
   offset from extending the page's scrollable width, which is what produced the
   clipped mobile layout. */

.op-pitch,
.op-pitch__media,
.op-body__railmedia,
.op-video--feature {
    overflow-x: clip;
}


/* Fallback for browsers without overflow: clip -- Safari before 16 and Firefox
   before 81. Applied only where it cannot create a sticky-breaking scroll
   container: op-pitch__media and the feature wrapper hold the video alone, so
   there is nothing sticky inside them to break. */

@supports not (overflow-x: clip) {
    .op-pitch__media,
    .op-video--feature {
        overflow-x: hidden;
    }
}


/* ---- reduced motion ----
   The nudge is a static offset rather than an animation, so it is kept. Listed
   explicitly so a future edit does not mistake it for something to disable. */
