/* PrimeFlix 3.61.27 P20 — one stable bottom-sheet geometry for the whole Mobile App. */
:root{
  --pfm-sheet-safe-bottom:calc(var(--pfm-nav-h,72px) + env(safe-area-inset-bottom) + 16px);
  --pfm-sheet-top-gap:16px;
}

/* Every sheet sits physically ABOVE the Liquid Glass bottom navigation. */
.pfm-sheet,
.pfm-a7-sheet,
.pfm-a8-sheet,
.pfma23-sheet{
  bottom:var(--pfm-sheet-safe-bottom)!important;
  max-height:calc(var(--pfm-viewport-h,100dvh) - var(--pfm-sheet-safe-bottom) - var(--pfm-sheet-top-gap))!important;
  border-radius:26px!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  z-index:1500!important;
}

/* Wrapping sheets keep their full-screen backdrop; only the panel is lifted above navigation. */
.pfma9-sheet,
.pfma10-checkout{z-index:1490!important}
.pfma9-sheet>section,
.pfma10-checkout>section{
  margin-bottom:var(--pfm-sheet-safe-bottom)!important;
  max-height:calc(var(--pfm-viewport-h,100dvh) - var(--pfm-sheet-safe-bottom) - var(--pfm-sheet-top-gap))!important;
  border-radius:26px!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  z-index:1500!important;
}
.pfma10-checkout>section{bottom:var(--pfm-sheet-safe-bottom)!important;margin-bottom:0!important}

/* Backdrops stay above page/nav for input safety, while the navigation remains visible underneath. */
.pfm-sheet-backdrop,
.pfm-a7-overlay,
.pfm-a8-sheet-backdrop,
.pfma23-sheet-backdrop,
.pfma9-sheet-backdrop,
.pfma10-checkout-backdrop{z-index:1490!important;bottom:var(--pfm-sheet-safe-bottom)!important}
/* Full-screen wrappers do not steal the navigation area below the sheet. */
.pfma9-sheet,.pfma10-checkout{pointer-events:none}
.pfma9-sheet-backdrop,.pfma10-checkout-backdrop,.pfma9-sheet>section,.pfma10-checkout>section{pointer-events:auto}

/* One gesture language: grab handle/header, drag UP to increase height, DOWN to reduce it. */
.pfm-sheet-handle,
.pfm-a7-sheet-handle,
.pfm-a8-sheet-handle,
.pfma23-sheet-handle,
.pfm-native-sheet-handle{
  width:48px!important;
  height:5px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.34)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  touch-action:none!important;
  cursor:grab;
}
.pfm-sheet-head,
.pfm-a7-sheet>header,
.pfm-a8-sheet>header,
.pfma23-sheet-head,
[data-pfma9-cover-sheet]>section>header,
[data-pfma10-checkout-sheet]>section>header{touch-action:none;user-select:none}
.pfm-sheet-head button,
.pfm-a7-sheet>header button,
.pfm-a8-sheet>header button,
.pfma23-sheet-head button,
[data-pfma9-cover-sheet]>section>header button,
[data-pfma10-checkout-sheet]>section>header button{touch-action:manipulation}

/* Height is the ONLY property the unified gesture engine modifies. Bottom position never moves. */
.pfm-sheet.pfm-unified-sheet-sized,
.pfm-a7-sheet.pfm-unified-sheet-sized,
.pfm-a8-sheet.pfm-unified-sheet-sized,
.pfma23-sheet.pfm-unified-sheet-sized,
.pfma9-sheet>section.pfm-unified-sheet-sized,
.pfma10-checkout>section.pfm-unified-sheet-sized{
  height:var(--pfm-unified-sheet-height)!important;
  max-height:calc(var(--pfm-viewport-h,100dvh) - var(--pfm-sheet-safe-bottom) - var(--pfm-sheet-top-gap))!important;
}
.pfm-sheet.is-dragging,
.pfm-a7-sheet.is-dragging,
.pfm-a8-sheet.is-dragging,
.pfma23-sheet.is-dragging,
.pfma9-sheet>section.is-dragging,
.pfma10-checkout>section.is-dragging{transition:none!important;user-select:none!important}

/* The sheet itself scrolls where appropriate; player/TV keep their internal flex scrollers. */
.pfm-sheet,.pfm-a7-sheet,.pfma9-sheet>section,.pfma10-checkout>section{overflow:auto!important;overscroll-behavior:contain}
.pfm-a8-sheet,.pfma23-sheet{overflow:hidden!important;display:flex;flex-direction:column}
.pfm-a8-quality-list,.pfm-a8-episode-list,.pfma23-sheet-list{min-height:0!important;flex:1 1 auto!important;max-height:none!important;overflow:auto!important}

/* Trailer follows the exact same bottom anchor/gesture as every other sheet. */
.pfm-a7-video-sheet{bottom:var(--pfm-sheet-safe-bottom)!important;height:auto!important;max-height:calc(var(--pfm-viewport-h,100dvh) - var(--pfm-sheet-safe-bottom) - var(--pfm-sheet-top-gap))!important}
.pfm-a7-video-sheet.pfm-unified-sheet-sized{height:var(--pfm-unified-sheet-height)!important}

/* Do NOT hide or move the Liquid Glass navigation. It is always below the sheet. */
.pfm-bottom-nav{z-index:60!important}

@media(min-width:600px){
  .pfm-sheet,.pfm-a7-sheet,.pfm-a8-sheet,.pfma23-sheet{max-width:min(620px,calc(100% - 28px))}
}
@media(prefers-reduced-motion:reduce){
  .pfm-sheet,.pfm-a7-sheet,.pfm-a8-sheet,.pfma23-sheet,.pfma9-sheet>section,.pfma10-checkout>section{transition:none!important}
}
body.pfm-route-player{--pfm-sheet-safe-bottom:calc(env(safe-area-inset-bottom) + 16px)}

/* P21 — closed means fully absent visually. The old translateY(105%) method cannot
   be used once sheets are anchored above the bottom navigation because it leaves
   a visible strip in front of the nav. */
.pfm-sheet:not(.is-open),
.pfm-a7-sheet:not(.is-open),
.pfm-a8-sheet:not(.is-open),
.pfma23-sheet:not(.is-open){
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.pfm-sheet.is-open,
.pfm-a7-sheet.is-open,
.pfm-a8-sheet.is-open,
.pfma23-sheet.is-open{
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}

/* Hidden wrappers/backdrops must never reserve a visual layer above navigation. */
.pfm-sheet-backdrop[hidden],
.pfm-a8-sheet-backdrop[hidden],
.pfma23-sheet-backdrop[hidden],
.pfma9-sheet[hidden],
.pfma10-checkout[hidden]{display:none!important}

/* No closed sheet/backdrop may intercept taps over the Liquid Glass nav. */
.pfm-sheet-backdrop[hidden],
.pfm-a8-sheet-backdrop[hidden],
.pfma23-sheet-backdrop[hidden]{pointer-events:none!important}
