/* PV LAB Video Transform / Replace Character v1. Scoped to a third Seedance task.
   Original subway artwork, existing Create and Extend layouts remain untouched. */
#app.video-studio-active.video-transform-active #video-task-switch button{
  padding-inline:5px!important;font-size:12px!important;gap:6px!important;
}
#app.video-studio-active.video-transform-active #reference-mode:not([hidden]){
  display:flex!important;flex-direction:column!important;gap:9px!important;
  border:0!important;padding:0!important;margin:0!important;background:transparent!important;
}
#app.video-studio-active.video-transform-active #reference-mode #reference-media:not([hidden]){
  display:flex!important;order:-2;flex-direction:column!important;gap:6px!important;
  padding:0!important;margin:0!important;border:0!important;background:transparent!important;
}
#app.video-studio-active.video-transform-active #reference-mode #reference-media>.pv-media-ref-group-video{
  display:flex!important;flex-direction:column!important;gap:5px;padding:0 0 8px;
  border-bottom:1px solid #2d3035;
}
#app.video-studio-active.video-transform-active #video-motion-toggle,
#app.video-studio-active.video-transform-active #reference-mode #reference-media>.pv-media-ref-group-audio,
#app.video-studio-active.video-transform-active #start-frame-maker,
#app.video-studio-active.video-transform-active #extend-help,
#app.video-studio-active.video-transform-active #reference-guidance,
#app.video-studio-active.video-transform-active #reference-mode>.pack-bar,
#app.video-studio-active.video-transform-active #reference-help{
  display:none!important;
}
#app.video-studio-active.video-transform-active #reference-mode .upload-heading{
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  gap:8px!important;padding:0 2px!important;margin:1px 0 0!important;
  color:#ebeced;font-size:12px!important;
}
#app.video-studio-active.video-transform-active #reference-mode #video-media-drop,
#app.video-studio-active.video-transform-active #reference-mode #reference-drop{
  min-height:70px!important;height:auto!important;padding:10px 12px!important;
  border:1px dashed #59616a!important;border-radius:9px!important;
  background:#23272b!important;color:#f1f3f4!important;
}
#app.video-studio-active.video-transform-active #reference-mode #video-media-drop:hover,
#app.video-studio-active.video-transform-active #reference-mode #reference-drop:hover{
  border-color:#a0a6ae!important;background:#2a3035!important;
}
#app.video-studio-active.video-transform-active #reference-mode #video-reference-list{
  max-height:155px!important;overflow:auto!important;margin:0!important;
}
#app.video-studio-active.video-transform-active #reference-mode #scene-video-selected,
#app.video-studio-active.video-transform-active #reference-mode #reference-list{
  max-height:172px!important;overflow:auto!important;margin:0!important;
}
#app.video-studio-active.video-transform-active #reference-mode>.upload-heading{
  order:-1;
}
#app.video-studio-active.video-transform-active #reference-mode #reference-drop{
  order:0;
}
#app.video-studio-active.video-transform-active #reference-mode>.scene-video-access{
  order:1;min-height:54px!important;background:#1b2025!important;
}
#app.video-studio-active.video-transform-active #reference-mode>.scene-video-access>button{
  min-height:54px!important;flex-direction:row!important;gap:9px!important;
  padding:6px!important;
}
#app.video-studio-active.video-transform-active #reference-mode>.scene-video-access>button:before{font-size:16px!important;}
#app.video-studio-active.video-transform-active #reference-mode #scene-video-selected{order:2;}
#app.video-studio-active.video-transform-active #reference-mode #reference-progress{order:3;}
#app.video-studio-active.video-transform-active #reference-mode #pv-video-ref-title{order:4;}
#app.video-studio-active.video-transform-active #reference-mode #reference-list{order:5;}
#app.video-studio-active.video-transform-active #reference-mode>.fine{order:6;}
#app.video-studio-active.video-transform-active #reference-mode #video-reference-list .reference-media-item{
  border:1px solid #3c4247;border-radius:8px;background:#171a1d;padding:6px;
}
#app.video-studio-active .canvas>.video-transform-compare:not([hidden]){
  position:absolute;left:16px;top:56px;z-index:12;
  display:inline-flex;align-items:center;gap:3px;
  padding:3px;border-radius:8px;border:1px solid #454a50;
  background:#151719;z-index:8;
}
#app.video-studio-active .video-transform-compare button{
  cursor:pointer;min-height:27px;padding:5px 10px;
  color:#aeb2b6;background:transparent;border:0;border-radius:5px;
  font:600 11px/1.25 'DM Sans',Arial,sans-serif;
}
#app.video-studio-active .video-transform-compare button[aria-pressed="true"]{
  color:#17191b;background:#e7e7e3;
}
#app.video-studio-active .video-transform-compare button:focus-visible{
  outline:2px solid #e6e6e4;outline-offset:2px;
}
@media(max-width:820px){
 #app.video-studio-active.video-transform-active #video-task-switch button{font-size:11px!important;gap:4px!important;}
 #app.video-studio-active.video-transform-active #video-task-switch svg{width:14px;height:14px;}
 #app.video-studio-active .video-transform-compare button{min-height:30px;}
}


/* 2026-11-06 — Approved Transform visual direction. The original Studio
   grid, preview/photo, gallery and History are intentionally untouched. */
html body #app.video-studio-active.video-transform-active #video-task-switch{
  display:flex!important;gap:7px!important;
}
html body #app.video-studio-active.video-transform-active #video-task-switch button{
  flex:1 1 0!important;min-width:0!important;
  height:39px!important;min-height:39px!important;
  font:600 12px/1.3 'DM Sans',Arial,sans-serif!important;
  border-radius:8px!important;
}
html body #app.video-studio-active.video-transform-active #mode-transform[aria-selected="true"]{
  background:#eeeeed!important;border-color:#eee!important;
  color:#141516!important;box-shadow:0 1px 8px #ffffff0f!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #reference-media>.pv-media-ref-group-video{
  display:flex!important;flex-direction:column!important;gap:6px!important;
  border-bottom:1px solid #2d3035!important;
  padding:0 0 12px!important;margin-bottom:4px!important;
}
html body #app.video-studio-active.video-transform-active .pv-media-ref-group-video:has(#video-reference-list .reference-media-item) #video-media-drop{
  display:none!important;
}
html body #app.video-studio-active.video-transform-active #video-reference-list .reference-media-item{
  display:grid!important;
  grid-template-columns:minmax(88px,34%) minmax(0,1fr) auto!important;
  grid-template-rows:auto auto!important;
  column-gap:12px!important;row-gap:4px!important;
  min-height:76px!important;max-height:118px!important;
  padding:7px!important;overflow:hidden!important;
  border:1px solid #3c3f45!important;border-radius:9px!important;
  background:#1a1c20!important;
}
html body #app.video-studio-active.video-transform-active #video-reference-list .reference-media-item>video{
  grid-column:1!important;grid-row:1/3!important;
  box-sizing:border-box!important;width:100%!important;height:76px!important;
  max-height:76px!important;border-radius:5px!important;
  object-fit:cover!important;background:#101114!important;
}
html body #app.video-studio-active.video-transform-active #video-reference-list .reference-media-item>strong{
  grid-column:2!important;grid-row:1!important;align-self:end!important;
  min-width:0!important;font:600 11px/1.35 'DM Sans',Arial,sans-serif!important;
  overflow-wrap:anywhere!important;color:#e8e9ea!important;
}
html body #app.video-studio-active.video-transform-active #video-reference-list .reference-media-item>input{
  display:none!important;
}
html body #app.video-studio-active.video-transform-active #video-reference-list .reference-media-item>.reference-actions{
  grid-column:3!important;grid-row:1/3!important;align-self:center!important;
}
html body #app.video-studio-active.video-transform-active #video-reference-list .reference-media-item>.reference-actions button:first-child{
  display:none!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #reference-drop{
  min-height:59px!important;background:#1d2025!important;
  border-color:#454950!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #reference-list{
  max-height:135px!important;overflow:auto!important;
}
html body #app.video-studio-active.video-transform-active #reference-list .reference-element-item{
  grid-column:1/-1!important;min-height:55px!important;
  background:#1a1d20!important;border-color:#41444b!important;
  padding:5px!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #pv-transform-reference-strip:not([hidden]){
  display:flex!important;align-items:stretch;gap:6px;
  margin:0!important;padding:2px 0 4px!important;
  width:100%;min-width:0;overflow-x:auto;scrollbar-width:thin;
  order:1;
}
html body #app.video-studio-active.video-transform-active #pv-transform-reference-strip img{
  flex:none;width:calc((100% - 24px)/5);min-width:42px;max-width:65px;
  height:64px;object-fit:cover;border-radius:6px;
  border:1px solid #34383e;background:#222429;
}
html body #app.video-studio-active.video-transform-active #pv-transform-reference-strip button,
html body #app.video-studio-active.video-transform-active #pv-transform-reference-strip .pv-transform-extra-photos{
  display:grid;place-items:center;flex:none;width:47px;height:64px;
  border:1px dashed #545960;border-radius:6px;
  background:#191c20;color:#efefed;font:500 20px/1 'DM Sans',Arial,sans-serif;
}
html body #app.video-studio-active.video-transform-active #pv-transform-reference-strip .pv-transform-extra-photos{
  font-size:11px;border-style:solid;color:#a5aab0;
}
html body #app.video-studio-active.video-transform-active #pv-transform-reference-strip button{
  cursor:pointer;
}
html body #app.video-studio-active.video-transform-active #reference-mode>.scene-video-access{
  order:2!important;min-height:53px!important;margin:0!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode>.scene-video-access>button{
  display:flex!important;flex-direction:row!important;justify-content:flex-start!important;
  min-height:53px!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #scene-video-selected{order:3!important;}
html body #app.video-studio-active.video-transform-active #reference-mode #reference-progress{order:4!important;}
html body #app.video-studio-active.video-transform-active #reference-mode #pv-video-ref-title{order:5!important;}
html body #app.video-studio-active.video-transform-active #reference-mode #reference-list{order:6!important;}
html body #app.video-studio-active.video-transform-active #reference-mode>.fine{order:7!important;}
html body #app.video-studio-active .canvas>.video-transform-compare:not([hidden]){
  left:50%!important;top:58px!important;transform:translateX(-50%);
  background:#151719dc!important;border-color:#42464b!important;
  border-radius:99px!important;z-index:13!important;
  backdrop-filter:blur(9px);-webkit-backdrop-filter:blur(9px);
  box-shadow:0 4px 25px #0005;
}
html body #app.video-studio-active.video-transform-active #video-inspector-empty .pv-video-sidebar-section:has(#pv-video-current-references){
  display:none!important;
}
html body #app.video-studio-active.video-transform-active #pv-transform-inspector:not([hidden]){
  display:flex!important;flex-direction:column;gap:8px;
  padding:16px 0!important;border-bottom:1px solid #2b2e31!important;
}
html body #app.video-studio-active.video-transform-active #pv-transform-inspector .pv-transform-inspector-task{
  font:600 9px/1.3 'DM Sans',Arial,sans-serif;letter-spacing:.14em;color:#a3a8ad;
}
html body #app.video-studio-active.video-transform-active #pv-transform-inspector h3{
  font:650 17px/1.3 'DM Sans',Arial,sans-serif;letter-spacing:-.03em;color:#f2f2f0;margin:0!important;
}
html body #app.video-studio-active.video-transform-active #pv-transform-inspector p{
  font:450 11px/1.5 'DM Sans',Arial,sans-serif;color:#aeb1b3;margin:0!important;
}
html body #app.video-studio-active.video-transform-active #pv-transform-inspector .pv-transform-inspector-assets{
  display:grid;gap:0;margin-top:5px;border-top:1px solid #292d32;
}
html body #app.video-studio-active.video-transform-active .pv-transform-inspector-assets>div{
  display:grid;gap:4px;padding:10px 0;border-bottom:1px solid #292d32;
}
html body #app.video-studio-active.video-transform-active .pv-transform-inspector-assets span{
  color:#969ba0;font:550 10px/1.4 'DM Sans',Arial,sans-serif;
}
html body #app.video-studio-active.video-transform-active .pv-transform-inspector-assets strong{
  min-width:0;overflow-wrap:anywhere;color:#e6e8e8;
  font:550 11px/1.4 'DM Sans',Arial,sans-serif;
}
#app.video-studio-active:not(.video-transform-active) #pv-transform-reference-strip{display:none!important;}
#app.video-studio-active:not(.video-transform-active) #pv-transform-inspector{display:none!important;}
@media(max-width:820px){
  html body #app.video-studio-active.video-transform-active #video-task-switch button{
    font-size:11px!important;min-height:39px!important;
  }
  html body #app.video-studio-active .canvas>.video-transform-compare:not([hidden]){
    top:48px!important;
  }
  html body #app.video-studio-active.video-transform-active #pv-transform-inspector:not([hidden]){
    padding:12px 0!important;
  }
}

/* Retail accounts may see the feature tab, but cannot spend on an unverified
   provider edit until its separate backend enable flag is explicitly set. */
#app.video-studio-active #mode-transform:disabled{
  cursor:not-allowed!important;opacity:.58!important;
}

/* 2026-11-06: Actual Transform drop targets. Scoped to the Transform tab.
   These are the existing file inputs and saved Elements button, not duplicates. */
html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active #reference-mode #reference-media #video-media-drop{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:27px 17px 14px!important;
  justify-items:center!important;
  align-content:center!important;
  align-items:center!important;
  gap:3px!important;
  min-height:92px!important;
  height:92px!important;
  width:100%!important;
  padding:9px 12px!important;
  border:1px dashed #697079!important;
  border-radius:9px!important;
  color:#eff0ef!important;
  background:#21262b!important;
  text-align:center!important;
  cursor:copy!important;
}
html body #app.video-studio-active.video-transform-active #reference-media #video-media-drop .pv-media-drop-symbol{
  display:block!important;grid-column:1!important;grid-row:1!important;
  width:26px!important;height:26px!important;
  color:#e0e4e6!important;
}
html body #app.video-studio-active.video-transform-active #reference-media #video-media-drop>span{
  display:block!important;grid-column:1!important;grid-row:2!important;
  width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;
  text-align:center!important;white-space:nowrap!important;
  font:600 11px/1.25 'DM Sans',Arial,sans-serif!important;
  color:#e9eaeb!important;
}
html body #app.video-studio-active.video-transform-active #reference-media #video-media-drop>small{
  display:block!important;grid-column:1!important;grid-row:3!important;
  width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;
  text-align:center!important;white-space:nowrap!important;
  font:450 9px/1.25 'DM Sans',Arial,sans-serif!important;
  color:#aeb5bc!important;
}
html body #app.video-studio-active.video-transform-active #reference-media #video-media-drop:is(:hover,:focus-within,.is-media-drag-over){
  border-color:#d1d7da!important;background:#2c343b!important;
  box-shadow:inset 0 0 0 1px #c2cbd022!important;
}
html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active #reference-mode #reference-drop,
html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active #reference-mode>.scene-video-access{
  box-sizing:border-box!important;min-height:74px!important;height:74px!important;
}
html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active #reference-mode #scene-video-open{
  box-sizing:border-box!important;min-height:72px!important;height:72px!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #reference-drop,
html body #app.video-studio-active.video-transform-active #reference-mode>.scene-video-access{
  border-radius:8px!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #scene-video-open>span{
  font-size:11px!important;font-weight:650!important;line-height:1.15!important;
}
html body #app.video-studio-active.video-transform-active #reference-mode #scene-video-open>small{
  font-size:9px!important;white-space:normal!important;line-height:1.15!important;
}
@media(max-width:440px){
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active #reference-mode #reference-media #video-media-drop{
    min-height:88px!important;height:88px!important;
  }
}


/* Transform reuses the exact native two-control Output settings row from Video.
   The original source length is read-only inside the existing Duration field.
   Resolution stays the native 480p / 720p / 1080p selector. */
html body #app.video-studio-active.video-transform-active #duration[hidden],
html body #app.video-studio-active #pv-transform-source-duration[hidden]{
  display:none!important;
}
html body #app.video-studio-active.video-transform-active #duration-control #pv-transform-source-duration:not([hidden]){
  display:flex!important;align-items:center!important;
  width:100%!important;height:29px!important;min-height:29px!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  color:#f1f1f2!important;font:650 12px/1.25 'DM Sans',Arial,sans-serif!important;
}


/* Transform's larger video/photo drop targets must not push native Output
   settings underneath the separate Generate footer in the empty editor.
   Reuse the existing desktop scrollport only when source/identity references
   or intentionally expanded prompt content actually need it. */
@media(min-width:821px){
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active
  .workspace.video-layout>.controls #pv-video-prompt-box{
    /* Absorb unused editor height, as the Create prompt does, while still
       shrinking on short screens to keep native Output settings reachable. */
    display:flex!important;
    flex-direction:column!important;
    flex:1 1 145px!important;
    min-height:115px!important;
    height:auto!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active
  .workspace.video-layout>.controls #pv-video-prompt-box textarea#prompt{
    flex:1 1 auto!important;
    height:auto!important;
    min-height:78px!important;
    max-height:none!important;
    overflow-y:auto!important;
    resize:vertical!important;
  }
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active
  .workspace.video-layout>.controls>.controls-body{
    gap:5px!important;
    padding-bottom:6px!important;
  }
}
@media(min-width:821px) and (max-height:820px){
  html body #app.video-studio-active.pv-video-approved-ready.pv-video-state-ready.pv-video-compact.video-transform-active
  .workspace.video-layout>.controls #pv-video-prompt-box textarea#prompt{
    min-height:78px!important;
  }
}
