/* Video Studio desktop | Use the full workspace above a reserved action footer.
   The whole-composer scroll let Generate leave the visible panel. Keep one
   settings scrollport with a shrinkable flex track, and reserve the footer's
   actual content height so neither the final settings nor action is clipped.
   Video only. Player, gallery, pricing, handlers and button design untouched. */
@media (min-width:821px){
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls{
    display:flex!important;
    flex-direction:column!important;
    height:calc(100% - 12px)!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:hidden!important;
    overscroll-behavior-y:contain!important;
    scrollbar-width:none!important;
    -ms-overflow-style:none!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls::-webkit-scrollbar{
    display:none!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls>.controls-body{
    flex:1 1 0!important;
    height:auto!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior-y:contain!important;
    scroll-padding-block:12px!important;
    scrollbar-width:none!important;
    padding-bottom:10px!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls #pv-video-prompt-box{
    flex:1 0 auto!important;
    min-height:145px!important;
    height:auto!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls #pv-video-prompt-box textarea#prompt{
    flex:1 0 auto!important;
    height:clamp(118px,19dvh,185px)!important;
    min-height:118px!important;
    max-height:60dvh!important;
    resize:vertical!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.pv-video-mode-text
  .workspace.video-layout>.controls #pv-video-prompt-box textarea#prompt{
    height:194px!important;
    min-height:194px!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls>.generate-zone{
    position:relative!important;
    top:auto!important;
    bottom:auto!important;
    z-index:1!important;
    flex:0 0 auto!important;
    height:auto!important;
    min-height:54px!important;
    margin:0!important;
    transform:none!important;
    box-shadow:none!important;
  }
  /* The footer remains a separate flex item, never an overlay on settings. */
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls>.generate-zone::after{
    content:none!important;
  }
}


/* Video UX finishing pass: keep the original reserved, non-overlay action.
   Hide the redundant manual-save action in Video only. Other tools continue
   to use the existing save handler and private draft infrastructure. */
html body #app.video-studio-active .workspace.video-layout>.controls>.generate-zone>#save{
  display:none!important;
}
html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
.workspace.video-layout>.controls>.generate-zone{
  isolation:isolate;
  background:#121315!important;
  border-top:1px solid #2b2d2f!important;
}

/* Keep the text editor and mode buttons in normal flow in the scrollport.
   No sticky or transformed inner layers that can paint over Text/Start-frame
   on an upward wheel gesture. The textarea retains its own native scrolling. */
@media (min-width:821px){
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls>.controls-body{
    scroll-behavior:auto!important;
    overscroll-behavior-y:contain!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls>.controls-body>#video-modes,
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls>.controls-body>#pv-video-prompt-box{
    position:relative!important;
    flex-shrink:0!important;
    transform:none!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact
  .workspace.video-layout>.controls #pv-video-prompt-box textarea#prompt{
    overscroll-behavior-y:contain!important;
  }
}

/* Native audio state is reflected by aria-pressed in video-editorial-deck.js.
   Swap actual speaker glyphs rather than relying on the "Off" label alone. */
#app.video-studio-active #pv-video-audio-pill .pv-audio-muted{display:none}
#app.video-studio-active #pv-video-audio-pill[aria-pressed="false"] .pv-audio-on{display:none}
#app.video-studio-active #pv-video-audio-pill[aria-pressed="false"] .pv-audio-muted{display:block}

/* A single understated play marker says video. Remove the duplicate Video
   badge only in Video Studio History; Assets retains its classification.
   Full-card keyboard and pointer play interaction is unchanged. */
#app.video-studio-active .video-feed-center #history .card[data-kind="video"]>.asset-video-badge{
  display:none!important;
}
#app.video-studio-active .video-feed-center #history .card[data-kind="video"] .history-video-play{
  top:50%!important;
  left:50%!important;
  bottom:auto!important;
  transform:translate(-50%,-50%)!important;
  width:39px!important;
  height:39px!important;
  min-width:39px!important;
  min-height:39px!important;
  border:1px solid #ffffff69!important;
  border-radius:50%!important;
  background:#111417c4!important;
  box-shadow:0 4px 17px #0005!important;
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  color:#f4f4f2!important;
}
#app.video-studio-active .video-feed-center #history .card[data-kind="video"] .history-video-play svg{
  width:14px!important;
  height:14px!important;
}
#app.video-studio-active .video-feed-center #history .card[data-kind="video"]:is(:hover,:focus-visible) .history-video-play{
  background:#e9e9e6e8!important;
  color:#151719!important;
  border-color:#e9e9e6!important;
}

