/* DramaMov Stage 14 — consolidated late-stage vertical-player refinements.
   This file is intentionally loaded immediately after laravel-player.css.
   Rules were moved verbatim from the tail of that file so visual cascade and
   behavior remain unchanged while the compatibility base stops accumulating
   feature-specific overrides. */
/* DramaMov Stage 11 Reels interaction polish v11.3
   - one native touch snap per reel
   - immersive idle chrome (episode chip remains available)
   - calmer social icon opacity */
.reels-motion-slide {
  scroll-snap-stop: always;
}

.premium-player-shell.is-reels .premium-player-vignette {
  transition: opacity 180ms ease;
}

/* When the viewer is simply watching, keep only the episode chooser visible. */
.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-vignette {
  opacity: 0;
}

.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-actions,
.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-sound-action {
  opacity: 0 !important;
  pointer-events: none !important;
}

.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-actions {
  transform: translateY(6px);
}

.premium-player-shell.is-reels .premium-player-copy > h1,
.premium-player-shell.is-reels .premium-player-copy > p,
.premium-player-shell.is-reels .premium-player-copy > .premium-player-kicker,
.premium-player-shell.is-reels .premium-player-copy > .dm-player-context-link {
  transition: opacity 180ms ease, transform 180ms ease;
}

.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-copy > h1,
.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-copy > p,
.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-copy > .premium-player-kicker,
.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-copy > .dm-player-context-link {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
}

/* The bottom episode chip intentionally survives immersive mode. */
.premium-player-shell.is-reels .premium-player-frame:not(.is-controls-visible) .premium-player-episode-chip {
  opacity: .9;
  pointer-events: auto;
}

/* User-requested calmer TikTok-like like/favorite glyphs. */
.premium-player-shell.is-reels .reels-action.is-like .reels-action-icon,
.premium-player-shell.is-reels .reels-action.is-favorite .reels-action-icon {
  opacity: .75;
}

@media (prefers-reduced-motion: reduce) {
  .premium-player-shell.is-reels .premium-player-copy > h1,
  .premium-player-shell.is-reels .premium-player-copy > p,
  .premium-player-shell.is-reels .premium-player-vignette,
  .premium-player-shell.is-reels .premium-player-actions {
    transition: none;
  }
}


/* DramaMov Stage 11.6.1 — persistent short-drama Series Mode.
   Discovery uses native snap scrolling; after a hook completes, the deck is
   locked and vertical gestures are reassigned to previous/next episodes of the
   same drama until the viewer explicitly returns to Reels. */
.reels-motion-deck.is-series-mode {
  overflow-y: hidden;
  overscroll-behavior: none;
  scroll-snap-type: none;
  touch-action: none;
}

.premium-player-shell.is-reels .premium-player-frame.is-series-mode {
  touch-action: none;
  overscroll-behavior: none;
}



/* DramaMov Stage 11.7 — centered premium episode picker.
   The chooser is a true modal on desktop and mobile, while the mobile global
   navigation remains above it so the viewer can leave the player at any time. */
.dm-player-sheet-backdrop {
  align-items: center !important;
  justify-content: center !important;
  padding: 22px !important;
  background: rgba(0, 0, 0, .62) !important;
  backdrop-filter: blur(13px) saturate(.82) !important;
}

.dm-player-sheet-backdrop .premium-player-sheet {
  width: min(560px, calc(100vw - 44px)) !important;
  max-height: min(72dvh, 680px) !important;
  overflow: hidden !important;
  padding: 20px !important;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 24px !important;
  background:
    radial-gradient(circle at 90% 0%, rgb(var(--sd-accent-rgb) / .09), transparent 34%),
    linear-gradient(180deg, rgba(24,26,35,.97), rgba(13,15,21,.985)) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.035) !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-handle {
  display: none !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading {
  align-items: center !important;
  margin: 0 0 14px !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading > div {
  gap: 5px !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading strong {
  max-width: min(420px, 72vw) !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  letter-spacing: -.025em !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading small {
  color: rgba(255,255,255,.42) !important;
  font-size: 9px !important;
  font-weight: 700 !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading button {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  border-color: rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.055) !important;
  color: rgba(255,255,255,.72) !important;
  font-size: 20px !important;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading button:hover {
  border-color: rgba(255,255,255,.14) !important;
  background: rgba(255,255,255,.09) !important;
  color: #fff !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-heading button:active {
  transform: scale(.96) !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-ranges {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr)) !important;
  gap: 7px !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-ranges button {
  min-width: 0 !important;
  min-height: 34px !important;
  justify-content: center !important;
  padding: 0 10px !important;
  border-radius: 11px !important;
  border-color: rgba(255,255,255,.07) !important;
  background: rgba(255,255,255,.035) !important;
  color: rgba(255,255,255,.48) !important;
}

.dm-player-sheet-backdrop .premium-player-sheet-ranges button.is-active {
  border-color: rgb(var(--sd-accent-rgb) / .50) !important;
  background: linear-gradient(180deg, rgb(var(--sd-accent-rgb) / .18), rgb(var(--sd-accent-rgb) / .10)) !important;
  color: rgba(255,255,255,.94) !important;
  box-shadow: inset 0 1px rgb(255 255 255 / .04), 0 7px 18px rgb(var(--sd-accent-rgb) / .08) !important;
}

.dm-player-sheet-backdrop .premium-player-episode-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 7px !important;
  max-height: min(48dvh, 430px) !important;
  padding: 1px 3px 4px 1px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255,255,255,.13) transparent !important;
}

.dm-player-sheet-backdrop .premium-player-episode-grid::-webkit-scrollbar {
  width: 5px;
  height: 0;
}

.dm-player-sheet-backdrop .premium-player-episode-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255,255,255,.13);
}

.dm-player-sheet-backdrop .premium-player-episode-grid .dm-episode-tile {
  min-width: 0 !important;
  min-height: 54px !important;
  height: 54px !important;
  display: grid !important;
  place-items: center !important;
  grid-template-columns: 1fr !important;
  gap: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.065) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.022)) !important;
  color: rgba(255,255,255,.67) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.018) !important;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease, color 130ms ease, box-shadow 130ms ease !important;
}

.dm-player-sheet-backdrop .premium-player-episode-grid .dm-episode-tile:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(255,255,255,.13) !important;
  background: rgba(255,255,255,.065) !important;
  color: rgba(255,255,255,.88) !important;
}

.dm-player-sheet-backdrop .premium-player-episode-grid .dm-episode-tile.is-current {
  border-color: rgb(var(--sd-accent-rgb) / .64) !important;
  background:
    linear-gradient(180deg, rgb(var(--sd-accent-rgb) / .34), rgb(var(--sd-accent-rgb) / .20)) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgb(var(--sd-accent-rgb) / .15), inset 0 1px rgba(255,255,255,.10) !important;
}

.dm-player-sheet-backdrop .premium-player-episode-grid .dm-episode-tile-number {
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: -.015em !important;
  color: inherit !important;
}

@media (max-width: 899px) {
  /* Keep the global bottom navigation above the episode chooser. */
  .dm-player-sheet-backdrop {
    z-index: 70 !important;
    inset: 0 0 calc(56px + env(safe-area-inset-bottom)) 0 !important;
    padding: 14px !important;
  }

  .dm-player-sheet-backdrop .premium-player-sheet {
    width: min(500px, calc(100vw - 24px)) !important;
    max-height: min(70dvh, 610px) !important;
    padding: 17px !important;
    border-radius: 21px !important;
  }

  .dm-player-sheet-backdrop .premium-player-sheet-heading {
    margin-bottom: 12px !important;
  }

  .dm-player-sheet-backdrop .premium-player-sheet-heading strong {
    max-width: calc(100vw - 112px) !important;
    font-size: 15px !important;
  }

  .dm-player-sheet-backdrop .premium-player-sheet-heading button {
    width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
  }

  .dm-player-sheet-backdrop .premium-player-sheet-ranges {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    margin-bottom: 11px !important;
  }

  .dm-player-sheet-backdrop .premium-player-sheet-ranges button {
    min-height: 32px !important;
    border-radius: 10px !important;
    padding-inline: 6px !important;
  }

  .dm-player-sheet-backdrop .premium-player-episode-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 6px !important;
    max-height: min(44dvh, 390px) !important;
  }

  .dm-player-sheet-backdrop .premium-player-episode-grid .dm-episode-tile {
    min-height: 50px !important;
    height: 50px !important;
    border-radius: 11px !important;
  }
}

@media (max-width: 350px) {
  .dm-player-sheet-backdrop .premium-player-episode-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}
