/* VenusClip's movement, all in one place (v161, M • HOME). motion.js draws the moments (the bin, a clip going
   to the Library, the squares of «Crear clips», the video going in, the «listo» tick); this file holds their
   shapes and, further down, the one set of rules every other moving thing in the app follows:
   · durations from tokens.css only: --dur-1 150ms (small things), --dur-2 200ms (panels, notices), --dur-3 280ms (things that travel);
   · one curve, var(--ease); opacity and short moves (8px at most); no scale, rotation, blur, bounce, glow or colour;
   · square corners, white as the only highlight.
   It loads after studio.css: a keyframe of the same name here wins, and rules use :not(#vm):not(#vm) + !important
   to beat the older layers without touching them. */

/* ============================================================ the moments (motion.js) */
/* A fixed copy of a card (its picture), for a card that leaves where it is. */
.vm-ghost{position:fixed;z-index:2147483100;pointer-events:none;background:var(--surface-2) center/cover no-repeat;
  border:var(--bw) solid var(--line-3);border-radius:var(--r-0);will-change:translate,opacity}
/* A small vertical tile (the clip's picture) that travels: to the bin, to «Biblioteca», into the video. */
.vm-tile{position:fixed;z-index:2147483100;pointer-events:none;width:28px;height:50px;border-radius:var(--r-0);display:grid;place-items:center;
  background:var(--surface-3) center/cover no-repeat;border:var(--bw) solid var(--line-3);will-change:translate,opacity}
.vm-tile svg{width:16px;height:16px;fill:var(--ink)}

/* The bin: graphite, a lid that lifts, the count of what went in. Centred with a margin (not a transform) so
   motion.js can move it with «translate». */
.vm-bin{position:fixed;left:50%;bottom:26px;z-index:2147483090;width:56px;height:64px;margin-left:-28px;pointer-events:none;opacity:0}
.vm-bin svg{width:100%;height:100%;overflow:visible}
.vm-bin .vm-body{fill:var(--surface-3);stroke:var(--line-3);stroke-width:1}
.vm-bin .vm-ribs{fill:none;stroke:var(--line-3);stroke-width:1.5;stroke-linecap:square}
.vm-bin .vm-lid{fill:var(--ink-3)}
.vm-bin-count{position:absolute;left:50%;top:-28px;translate:-50% 0;opacity:0;padding:var(--sp-1) var(--sp-2);border-radius:var(--r-0);
  background:var(--card);color:var(--ink);border:var(--bw) solid var(--line-2);font:var(--fw-semi) var(--fs-label)/1.2 var(--label);letter-spacing:var(--ls-label);white-space:nowrap}
@media(max-width:760px){.vm-bin{bottom:calc(96px + env(safe-area-inset-bottom))}}

/* «Crear clips»: four small white and grey squares. */
.vm-spark{position:fixed;z-index:2147483100;pointer-events:none;display:block;background:var(--ink);border-radius:var(--r-0)}
.vm-spark:nth-child(2n){background:var(--ink-3)}

/* Where something lands: a square outline the size of what it landed on, that fades. */
.vm-ring{position:fixed;z-index:2147483100;pointer-events:none;border-radius:var(--r-0);border:var(--bw) solid var(--ink)}

/* «Listo» notices: the square becomes a tick that draws itself. The v160 layer makes the square blink
   (#status:not(#v160)::before); a done notice stops blinking. */
#status.vm-done::before{width:16px;height:16px;border-radius:var(--r-0)!important;margin-right:9px;vertical-align:-3px;background:var(--ink)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%231F2126' stroke-width='3' stroke-linecap='square' stroke-linejoin='miter' stroke-dasharray='20' stroke-dashoffset='20'%3E%3Canimate attributeName='stroke-dashoffset' from='20' to='0' dur='.2s' begin='.04s' fill='freeze'/%3E%3C/path%3E%3C/svg%3E") center/14px no-repeat!important}
#status.vm-done:not(#vm):not(#vm)::before{animation:vm-tick-in var(--dur-2) var(--ease) both!important}
@keyframes vm-tick-in{from{opacity:0;translate:0 2px}}
/* An error is not work in progress either: its red square stays still (the notice itself gives a 3px nudge,
   «vm-nudge-soft» in studio.css). */
#status.error:not(#vm):not(#vm)::before{animation:none!important}

/* ============================================================ entrances
   The older layers animate «transform» with no end frame, so an element centred with translateX(-50%)
   (the selection bar, the task bar, the notices) slid half the screen while it came in. Every entrance now
   moves with the separate «translate» property, which adds to the element's own transform instead of
   replacing it, and none scales or blurs. */
@keyframes rise{from{opacity:0;translate:0 8px}}
@keyframes rise-in{from{opacity:0;translate:0 6px}}
@keyframes rise-soft{from{opacity:0;translate:0 6px}}
@keyframes pop{from{opacity:0;translate:0 8px}}
@keyframes viewin{from{opacity:0}}
@keyframes panel-in{from{opacity:0;translate:0 4px}}
@keyframes ev-rise{from{opacity:0;translate:0 8px}to{opacity:1;translate:none}}
@keyframes ev-card{from{opacity:0;translate:0 6px}}
@keyframes cal-pop{from{opacity:0;translate:0 4px}}
@keyframes pub-in{from{opacity:0;translate:0 8px}}
@keyframes txt-tag{from{opacity:0;translate:0 3px}}
@keyframes txt-fan{from{opacity:0;translate:0 6px}}
@keyframes txt-row-in{from{opacity:0;translate:0 6px}}
@keyframes lc-in{from{opacity:0;translate:0 6px}}
@keyframes ds-in{from{opacity:0;translate:0 6px}}
@keyframes gift-in{from{opacity:0;translate:0 6px}}
@keyframes topup-enter{from{opacity:0;translate:0 8px}to{opacity:1;translate:none}}
@keyframes sideDock{from{opacity:0;translate:-12px 0}}
@keyframes item-in{from{opacity:0;translate:0 -2px}}
@keyframes item-in-up{from{opacity:0;translate:0 2px}}
@keyframes float-in{from{opacity:0;translate:0 -4px}}
@keyframes float-in-up{from{opacity:0;translate:0 4px}}
@keyframes float-out{to{opacity:0}}
@keyframes v103-settle{from{opacity:0;translate:0 5px}}
@keyframes v103-drop{from{opacity:0;translate:0 -6px}}
@keyframes v105-rise{from{opacity:0;translate:0 6px}}
@keyframes v105-unfold{from{opacity:0;translate:-8px 0}}
@keyframes v106-settle{from{opacity:0;translate:0 6px}}
@keyframes v108-lift{from{opacity:0;translate:0 8px}}
@keyframes v108-sink{to{opacity:0;translate:0 6px}}

/* Menus and floating panels: in 200ms, out 150ms. */
.float:not(#vm):not(#vm){animation-duration:var(--dur-2)!important;animation-timing-function:var(--ease)!important}
.float.out:not(#vm):not(#vm){animation-duration:var(--dur-1)!important}

/* Dialogs (borrar, confirmar, ajustes): they used to grow out of the button with a scale and an overshoot
   (v106). Now they come up 6px and fade in 280ms, and leave in 200ms; their content comes with them, not after. */
dialog:not(#vm):not(#vm),.login-dialog:not(#vm):not(#vm){transform:none!important;filter:none!important;translate:0 6px;opacity:0;
  transition:translate var(--dur-2) var(--ease),opacity var(--dur-2) var(--ease),overlay var(--dur-2) allow-discrete,display var(--dur-2) allow-discrete!important}
dialog[open]:not(#vm):not(#vm),.login-dialog[open]:not(#vm):not(#vm){translate:none;opacity:1;
  transition:translate var(--dur-3) var(--ease),opacity var(--dur-2) var(--ease),overlay var(--dur-3) allow-discrete,display var(--dur-3) allow-discrete!important}
@starting-style{dialog[open]:not(#vm):not(#vm),.login-dialog[open]:not(#vm):not(#vm){translate:0 6px;opacity:0}}
dialog[open]:not(#vm):not(#vm)>:not(.dialog-x){animation:none!important}

/* ============================================================ uploading, creating, generating */
/* «Crear clips»: no blurred rainbow halo behind the button, no ripple from the finger (ui.js no longer makes one). */
.ai-cta:not(#vm):not(#vm)::after{display:none!important}
.wave-layer:not(#vm):not(#vm){display:none!important}
/* Progress: the upload bar is glided by studio.js frame by frame, so CSS must not ease it again (it fell
   behind and moved backwards); the others ease 280ms. */
#prep-bar:not(#vm):not(#vm){transition:none!important}
.bar:not(#vm):not(#vm) i:not(#prep-bar),.credits-bar:not(#vm):not(#vm) i{transition:width var(--dur-3) var(--ease)!important}
/* While a clip is being made: the project's card in Biblioteca and the veil over a clip the AI redoes (or the
   editor's stage while it renders). Their bars step 280ms on the curve like every other bar (they crept 1.45s
   linear and 0.7s), and the veil's bar leaves in 200ms. The loops that stay are v160's (studio.css): the small
   square that blinks and the square whose edge a white stretch goes round; both end where they start, so they
   never jump when they begin again. */
.proj-card:not(#vm):not(#vm) .proj-progress>span{transition:transform var(--dur-3) var(--ease)!important}
.wv-bar:not(#vm):not(#vm) span{transition:width var(--dur-3) var(--ease)!important}
.work-veil:not(#vm):not(#vm) .wv-bar{transition:opacity var(--dur-2) var(--ease)!important}
/* No light sweeping across anything: not over an editor panel while the AI works (a blue-tinted gradient), not
   inside Editar video's search bar (a white gradient over the white bar), not over a clip still in the making
   (its gradient was flattened in v91, so it swept nothing and only kept repainting). */
.ed-section.ai-working:not(#vm):not(#vm)::after,.ev-search-bar:not(#vm):not(#vm) i::after{display:none!important}
.skeleton:not(#vm):not(#vm),.ai-shimmer:not(#vm):not(#vm){animation:none!important}
/* Thumbnails appear with a plain fade (they zoomed out of a blur over 0.8s). */
:is(.lib-media,.recent-card,.s-thumb,.proj-bg) img:not(#vm):not(#vm),.project-folder>img:not(#vm):not(#vm){transition:opacity var(--dur-2) var(--ease)!important}
img.soft-wait:not(#vm):not(#vm){transform:none!important;filter:none!important}
/* Tabs and the side bar's highlight slide 200ms, without the spring. */
.glide:not(#vm):not(#vm){transition:transform var(--dur-2) var(--ease),width var(--dur-2) var(--ease),height var(--dur-2) var(--ease),opacity var(--dur-1) var(--ease)!important}
/* The rail of tools beside a loaded video, and the side bar that folds away when a video is in: 280ms on the
   one curve (they took 450ms on a slower one); the rail's arrow turns at once instead of spinning. */
@media(min-width:761px){body:is(.editing,.in-crear.loaded) .work-rail:not(#vm):not(#vm){transition:transform var(--dur-3) var(--ease)!important;animation-duration:var(--dur-2)!important;animation-timing-function:var(--ease)!important}}
.sidebar:not(#vm):not(#vm){transition-timing-function:var(--ease)!important}
.rail-btn .chev:not(#vm):not(#vm){transition:none!important}
/* Notices: outside the app they came down 16px with a scale; now 8px, like inside (studio.css, v160). */
body:not(.in-app):not(.editing) #status:not(.show):not(#vm):not(#vm){transform:translate(-50%,-8px)!important}
.below-hint:not(#vm):not(#vm){animation-duration:var(--dur-2)!important;animation-timing-function:var(--ease)!important}
/* New clip cards: ui.js brings each one in once (it used to come in twice: here and from ui.js). */
.result-card:not(#vm):not(#vm),.lib-card:not(#vm):not(#vm){animation:none!important}

/* ============================================================ selecting */
/* The selection bar comes up 6px (it slid sideways ~500px: see «entrances»). */
#lib-bulk:not([hidden]):not(#vm):not(#vm){animation:rise-in var(--dur-2) var(--ease) both!important}
/* The pick box: square, no growing on hover; a picked card keeps its size (the white line marks it). */
.pick:not(#vm):not(#vm){border-radius:var(--r-0)!important;transition:background-color var(--dur-1) var(--ease),border-color var(--dur-1) var(--ease)!important}
.pick:not(#vm):not(#vm):hover{transform:none!important}
.lib-card.picked:not(#vm):not(#vm) .lib-media{transform:none!important}
/* «Restaurar»: the arrow no longer spins on hover, and its count is square. */
.restore-btn:not(#vm):not(#vm):hover svg{transform:none!important}
.restore-btn:not(#vm):not(#vm) small{border-radius:var(--r-0)!important}

/* ============================================================ hovers: colour, not size */
:is(.s-thumb:hover img,.play-btn:hover,.side-nav button:hover svg,.swatches button:hover):not(#vm):not(#vm){transform:none!important}

/* ============================================================ yes, no, cancelled, undone
   The moments that answer the user (the notice at the bottom, a confirmation, a tick, a switch, «cancelado»)
   follow the same rules as the rest: square, white, 150–280ms on the one curve, no scale and no spring. */

/* The notice at the bottom (#toast-card, «Deshacer»): a square picture; it comes up 8px and fades in
   (it rose 16px with a scale and a 0.5s spring) and leaves a little faster than it came. */
#toast-card:not(#vm):not(#vm){transform:translate(-50%,8px)!important;
  transition:opacity var(--dur-1) var(--ease),transform var(--dur-2) var(--ease)!important}
#toast-card.show:not(#vm):not(#vm){transform:translate(-50%,0)!important;
  transition:opacity var(--dur-2) var(--ease),transform var(--dur-3) var(--ease)!important}
#toast-card:not(#vm):not(#vm) .avatar,#toast-card:not(#vm):not(#vm) .avatar::before{border-radius:var(--r-1)!important}

/* The dark veil behind a confirmation comes and goes with it (200ms; it took 300ms). */
dialog:not(#vm):not(#vm)::backdrop,.login-dialog:not(#vm):not(#vm)::backdrop{
  transition:background-color var(--dur-2) var(--ease),backdrop-filter var(--dur-2) var(--ease),overlay var(--dur-2) allow-discrete,display var(--dur-2) allow-discrete!important}

/* Pressing: buttons sink 1px (ui.js); none shrinks any more («Seleccionar», «Cancelar», «Deshacer», the menu,
   the chips, the boxes). */
:is(.ghost-btn,.secondary,.icon-btn,.text-btn,.chips button,.segmented button,.ev-seg button,.side-nav button,.bf-pill,.legal-check,
  .rec-speed button,.sc-format,.ev-view .ev-chip,.crf-formats button,button.ev-mode,input[type=checkbox]):active:not(#vm):not(#vm){transform:none!important}

/* Switches: the knob slides 200ms (it sprang for 0.45s) and turns graphite when on, so it shows on the
   white track (it was white on white). */
.toggle input[type=checkbox]:not(#vm):not(#vm){animation:none!important;transition:background-color var(--dur-2) var(--ease)!important}
.toggle input[type=checkbox]:not(#vm):not(#vm)::before{box-shadow:none!important;
  transition:transform var(--dur-2) var(--ease),background-color var(--dur-2) var(--ease),width var(--dur-1) var(--ease)!important}
.toggle input[type=checkbox]:checked:not(#vm):not(#vm)::before{background:var(--accent-ink)!important}

/* Tick boxes: square; the tick fades in (it grew out of nothing with a spring) in graphite on white. */
input[type=checkbox]:not(.toggle input):not(.vs-native):not(#vm):not(#vm){border-radius:var(--r-0)!important;
  transition:background-color var(--dur-1) var(--ease),box-shadow var(--dur-1) var(--ease)!important}
input[type=checkbox]:not(.toggle input):not(.vs-native):not(#vm):not(#vm)::after{transform:rotate(-45deg)!important;opacity:0;transition:opacity var(--dur-1) var(--ease)!important}
input[type=checkbox]:not(.toggle input):not(.vs-native):checked:not(#vm):not(#vm)::after{opacity:1}
/* The terms box when signing up: square, no growing or glow when ticked, and a graphite tick that draws
   itself in 200ms (it was white on the white box). */
.lc-box:not(#vm):not(#vm){border-radius:var(--r-0)!important;transform:none!important;box-shadow:none!important;
  transition:background-color var(--dur-1) var(--ease),border-color var(--dur-1) var(--ease)!important}
.lc-box:not(#vm):not(#vm) svg{stroke-linecap:square!important;stroke-linejoin:miter!important;transition:stroke-dashoffset var(--dur-2) var(--ease)!important}
.legal-check input:checked~.lc-box:not(#vm):not(#vm) svg{stroke:var(--accent-ink)!important}

/* Why you cancel (the plan's cancel steps): square choices, the picked one a square inside a square and a
   white line round it (its line went transparent when picked). */
.cx-reasons:not(#vm):not(#vm) button{transition:border-color var(--dur-1) var(--ease),background-color var(--dur-1) var(--ease)!important}
.cx-reasons:not(#vm):not(#vm) button.on{border-color:var(--ink)!important}
.cx-reasons:not(#vm):not(#vm) button::before{border-radius:var(--r-0)!important;
  transition:border-color var(--dur-1) var(--ease),box-shadow var(--dur-2) var(--ease)!important}

/* The notice at the top (#status), by what it says (motion.js): work in progress keeps the blinking square;
   done gets the tick (above); cancelled, undone or switched off gets a still square outline with a cross that
   draws itself; anything else (a hint, a «no hay nada») keeps its square still. */
#status.vm-still:not(#vm):not(#vm)::before{animation:none!important}
#status.vm-stop:not(#vm):not(#vm)::before{width:16px;height:16px;border-radius:var(--r-0)!important;margin-right:9px;vertical-align:-3px;
  box-shadow:inset 0 0 0 var(--bw) var(--ink)!important;animation:vm-tick-in var(--dur-2) var(--ease) both!important;background:transparent
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 8l8 8M16 8l-8 8' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='square' stroke-dasharray='23' stroke-dashoffset='23'%3E%3Canimate attributeName='stroke-dashoffset' from='23' to='0' dur='.2s' begin='.04s' fill='freeze'/%3E%3C/path%3E%3C/svg%3E") center/16px no-repeat!important}

/* ============================================================ less movement
   With the system's «reduce motion» on, nothing travels: what fades still fades (the owner wants the web to
   keep animating, ui.js), but the flying tiles, the bin and the squares stay away and panels don't move. */
@media(prefers-reduced-motion:reduce){
  .vm-ghost,.vm-tile,.vm-bin,.vm-spark,.vm-ring{display:none!important}
  #status.vm-done:not(#vm):not(#vm)::before,#status.vm-stop:not(#vm):not(#vm)::before,#status.vm-error{animation:none!important}
  #toast-card:not(#vm):not(#vm),#toast-card.show:not(#vm):not(#vm){transform:translate(-50%,0)!important}
  dialog:not(#vm):not(#vm),.login-dialog:not(#vm):not(#vm),dialog[open]:not(#vm):not(#vm),.login-dialog[open]:not(#vm):not(#vm){translate:none}
  @starting-style{dialog[open]:not(#vm):not(#vm),.login-dialog[open]:not(#vm):not(#vm){translate:none}}
  #lib-bulk:not([hidden]):not(#vm):not(#vm),.float:not(.out):not(#vm):not(#vm){animation-name:v160-in!important}
}
