/* Stand-alone tools (Apple Music motion, retro phone, glitch maker) — they use the editors' own design (.editor, .stage, .panel,
   .sec, .group, .seg, .fmt, .vcats, .exportrow, .cta from app.css + vr.css). Only what those don't have lives here. */

/* stage: ONLY the preview and the play row — every choice (format, reset…) is in the settings, so the picture gets the room */
/* .editor.mxed: must beat .editor .stage{padding:28px} in vr.css, which loads later */
.editor.mxed .stage{gap:10px;padding:12px;align-items:stretch;min-width:0}
.mx-screens{display:flex;gap:18px;align-items:flex-start;justify-content:center;border-radius:var(--r-m,12px);transition:background .2s}
.mx-screens.drop{background:rgba(59,43,179,.35)}
.mx-scr{margin:0;display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.mx-scr canvas{display:block;width:100%;border-radius:var(--r-s,4px);box-shadow:0 24px 60px rgba(0,0,0,.55);background:#000}
.mx-scr figcaption{font:600 12px/1 var(--f-mono,monospace);letter-spacing:.08em;color:#a99fb4;text-transform:uppercase}
.mx-screens.v-both .sq{flex:4;max-width:var(--mx-h,640px)}
.mx-screens.v-both .tall{flex:3;max-width:calc(var(--mx-h,640px) * .75)}
.mx-screens.v-sq .tall,.mx-screens.v-tall .sq{display:none}
.mx-screens.v-sq .sq{width:min(100%,var(--mx-h,640px))}
.mx-screens.v-tall .tall{width:min(100%,calc(var(--mx-h,640px) * .75))}
.mx-time{display:flex;align-items:center;gap:12px}
.mx-time input[type=range]{flex:1;accent-color:var(--red,#e33d2e)}
.mx-play{width:40px;height:40px;border-radius:50%;border:0;background:var(--red,#e33d2e);color:#fff;font-size:14px;cursor:pointer;flex:none}
.mx-clock{font:500 13px/1 var(--f-mono,monospace);color:#cfc7d9;min-width:92px;text-align:right}

/* panel: format buttons in 3 or 4 columns; looks as tiles with a short description; layer controls hidden when the layer is "None" */
.editor .fmt.cols3{grid-template-columns:repeat(3,1fr)}
.editor .fmt.cols4{grid-template-columns:repeat(4,1fr)}
.mxed .mx-presets button{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:10px}
.mxed .mx-presets button small{font-size:12px;font-weight:500;opacity:.75}
.mxed .sec.off .lyr-ctl{display:none}
.mxed .lyr-ctl{display:flex;flex-direction:column;gap:12px}
.mxed .mx-color{width:46px;height:28px;border:1px solid var(--ink-4,#3d3352);border-radius:6px;background:none;padding:0 2px;cursor:pointer}
.mxed .caption.warn,.mxed .hint.warn{color:#ffb39a}

/* export row: results with a video preview and a Download button */
.mxed .exportrow .progress .btn{align-self:flex-start}
.mxed .exportrow .resultwrap{gap:16px}
.mxed .mx-res{display:flex;gap:14px;align-items:center;flex:1 1 420px;min-width:0}
.mxed .mx-res video{width:auto;height:160px;max-width:45%;border-radius:var(--r-s,4px);background:#000;object-fit:contain}
.mxed .mx-resinfo{display:flex;flex-direction:column;gap:6px;min-width:0}
.mxed .mx-resinfo .caption{margin:0}
.mxed .mx-resinfo .cta{display:inline-flex;align-items:center;justify-content:center;min-width:200px;text-decoration:none}

/* desktop: the preview + export bar stay in view (sticky column, see "editor layout" in vr.css);
   --stageh (set by VRFlow.stickyCol) is the height left for the stage; the picture takes it minus the paddings and the play row
   (.cap = the tool has a caption line under the picture) */
@media (min-width:981px){
  .editor.mxed{grid-template-rows:auto;--mx-h:max(200px,calc(var(--stageh,600px) - 76px))}
  .editor.mxed.cap{--mx-h:max(200px,calc(var(--stageh,600px) - 106px))}
  .mxed .stage{position:relative}
}
/* phone/tablet: the preview sticks under the site header (--edtop comes from VRFlow.stickyCol) while the settings scroll under it;
   as big as possible, but ~240 px of settings stay visible below it */
@media (max-width:980px){
  .editor.mxed{--mx-h:max(180px,min(44vh,calc(100vh - var(--edtop,133px) - 302px)))}
  .editor.mxed .stage{position:sticky;top:calc(var(--edtop,133px) - 12px);z-index:5;padding:8px 10px;gap:6px;box-shadow:0 10px 24px rgba(0,0,0,.45)}
  .mx-scr figcaption{display:none}
}
@media (max-width:760px){
  .mxed .mx-res{flex-direction:column;align-items:stretch}
  .mxed .mx-res video{max-width:100%;height:auto;max-height:260px}
}

/* export running: the preview stops and says so */
.mxed .stage.mx-paused .mx-screens{opacity:.35;pointer-events:none}
.mxed .stage.mx-paused::after{content:attr(data-paused);position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);
  background:var(--ink,#16111f);border:1px solid var(--ink-4,#3d3352);border-radius:999px;padding:10px 18px;font:600 14px/1.2 var(--f-body,sans-serif);color:#fff;white-space:nowrap;z-index:2}
