/* Motion Transfer - only what the Ad Studio's stylesheet does not already
   carry. The shell (header, rail, steps, drop zone, bottom bar) is shared on
   purpose; everything here is specific to a screen whose subject is a moving
   picture rather than a still one. */

.mt-body{--mt-accent:#38BDF8;--mt-accent2:#0EA5E9}

/* `hidden` HAS TO WIN. Every rule below sets an explicit display, and an
   explicit display beats the hidden attribute - so the empty result <video>
   rendered its native 0:00 scrubber over the placeholder, and the chosen-clip
   row sat under the drop zone as a grey square, both on a page where nothing
   had been chosen yet. Neither showed up in any measurement; the screenshot
   showed both. */
.mt-body [hidden]{display:none!important}

/* the chosen clip */
.mt-clip{display:grid;grid-template-columns:96px minmax(0,1fr) auto;align-items:center;gap:12px;margin-top:12px}
.mt-clip video{width:96px;height:96px;object-fit:cover;border-radius:14px;display:block;background:#0b0b12}

/* reference images */
.mt-refs{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:10px}
.mt-refs:empty{display:none}
.mt-ref{position:relative;aspect-ratio:1;border-radius:14px;overflow:hidden;background:#0b0b12;border:1px solid rgba(255,255,255,.10)}
.mt-ref img{width:100%;height:100%;object-fit:cover;display:block}
.mt-ref.is-busy::after{content:"";position:absolute;inset:0;background:rgba(8,8,14,.62)}
.mt-refX{
  position:absolute;top:5px;right:5px;width:22px;height:22px;display:grid;place-items:center;
  border:0;border-radius:50%;background:rgba(8,8,14,.78);color:#fff;
  font-size:13px;line-height:1;cursor:pointer;
}
.mt-refX:hover{background:#ef4444}
.mt-addRef{
  margin-top:10px;width:100%;min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;
  border:1px dashed rgba(255,255,255,.22);border-radius:14px;background:transparent;
  color:#c9c2df;font-size:13px;font-weight:700;cursor:pointer;
  transition:border-color .16s ease,color .16s ease;
}
.mt-addRef:hover:not(:disabled){border-color:var(--mt-accent);color:#fff}
.mt-addRef:disabled{opacity:.42;cursor:not-allowed}

/* quality */
.mt-res{display:grid;gap:10px}
.mt-resOpt{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;
  padding:13px 14px;border:1px solid rgba(255,255,255,.12);border-radius:15px;
  background:rgba(255,255,255,.02);cursor:pointer;
  transition:border-color .16s ease,background .16s ease;
}
.mt-resOpt:hover{border-color:rgba(56,189,248,.44)}
.mt-resOpt.is-on{border-color:var(--mt-accent);background:rgba(56,189,248,.10)}
.mt-resName{color:#fff;font-size:14px;font-weight:800;line-height:1.2}
.mt-resNote{color:#8f88a6;font-size:11.5px;line-height:1.3;margin-top:2px}
.mt-resCost{color:#7dd3fc;font-size:12px;font-weight:800;white-space:nowrap}

/* the result */
.mt-outBox{
  position:relative;display:grid;place-items:center;width:100%;
  aspect-ratio:16/9;border-radius:20px;overflow:hidden;
  background:linear-gradient(150deg,#121020 0%,#0a0910 60%,#07060c 100%);
  border:1px solid rgba(255,255,255,.09);
}
.mt-outBox video{width:100%;height:100%;object-fit:contain;display:block;background:#07060c}
.mt-placeholder{display:grid;justify-items:center;gap:10px;color:#6f6889;padding:22px;text-align:center}
.mt-placeholder svg{width:38px;height:38px}
.mt-placeholder p{margin:0;font-size:12.5px;line-height:1.5;max-width:26ch}

/* a running job: the box breathes so a long wait does not look like a hang */
.mt-outBox.is-working{border-color:rgba(56,189,248,.44)}
.mt-outBox.is-working::after{
  content:"";position:absolute;left:0;right:0;top:0;height:2px;
  background:linear-gradient(90deg,transparent,var(--mt-accent),transparent);
  animation:mtScan 1.6s linear infinite;
}
@keyframes mtScan{0%{transform:translateX(-100%)}100%{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.mt-outBox.is-working::after{animation:none;opacity:.7}}

/* the tool is not wired up yet */
.mt-offline{
  margin:0 0 14px;padding:12px 14px;border-radius:14px;
  border:1px solid rgba(251,191,36,.42);background:rgba(251,191,36,.10);
  color:#fde68a;font-size:12.5px;line-height:1.45;
}

/* ── phone: the steps come first ────────────────────────────────────── */
@media (max-width:900px){
  /* The Ad Studio pulls its canvas above the controls, because that canvas
     redraws as you type and is the point of the screen. Here the box is
     empty until a render that takes minutes has finished, so inheriting that
     rule put a large empty rectangle on the whole first screen and pushed
     "Your clip" below the fold. Seen in the screenshot, not in any number. */
  .mt-stage .mt-outWrap{order:1}
  .mt-outBox{aspect-ratio:4/3;max-height:42vh}
  /* Nothing to look at yet, so it does not need to be looked at yet. */
  .mt-outWrap.is-idle{display:none}
}

/* The agents' one line. Quiet: it explains what happened to the shot, it does
   not compete with the status beside it. */
.mt-direction{margin:8px 0 0;font-size:13px;line-height:1.5;color:var(--text-3,#8A8F98);
  padding-inline-start:10px;border-inline-start:2px solid rgba(139,92,246,.45);max-width:56ch}
