/* QuickMart motion pack — 2026-11-22
   Applies the reference motion language (morph, float, draw, drop-bounce,
   fly-to-bin, follow-return) to matching existing surfaces.
   Behaviour, branding and layout are unchanged; this is motion only.
   All effects require prefers-reduced-motion: no-preference, and the JS
   orchestrator also exits early when reduced motion is requested. */

/* ---------- 2. Text fields: line draws from centre, label floats ---------- */
.qm-mfield{position:relative}
.qm-mfield::after{
  content:"";position:absolute;bottom:0;left:50%;z-index:2;
  width:calc(100% - 22px);height:2px;border-radius:2px;background:#F2645A;
  transform:translateX(-50%) scaleX(0);transform-origin:center;
  transition:transform .35s cubic-bezier(.22,.68,.32,1);pointer-events:none;
}
.qm-mfield:focus-within::after{transform:translateX(-50%) scaleX(1)}
.qm-mfield-label>span:first-child{transition:color .25s ease,transform .25s ease}
.qm-mfield-label:focus-within>span:first-child{color:#F2645A}
html.qm-night .qm-mfield-label:focus-within>span:first-child{color:#F7A65A}

/* ---------- 4. Map pin: lift while panning, drop then bounce ---------- */
.qm-pin{transition:transform .18s ease-out;transform-origin:50% 100%}
.qm-pin-lift{transform:translateY(-12px) scale(1.05)}
.qm-pin-drop{animation:qmPinDrop .62s cubic-bezier(.22,.68,.32,1)}
@keyframes qmPinDrop{
  0%{transform:translateY(-30px)}
  32%{transform:translateY(0)}
  52%{transform:translateY(-9px)}
  70%{transform:translateY(0)}
  84%{transform:translateY(-3px)}
  100%{transform:translateY(0)}
}

/* ---------- 3. Order steps: current step wakes ---------- */
.qm-step-wake{animation:qmStepWake 2.2s ease-in-out infinite}
@keyframes qmStepWake{
  0%,100%{box-shadow:0 0 0 0 rgba(242,100,90,0)}
  50%{box-shadow:0 0 0 7px rgba(242,100,90,.18)}
}

/* ---------- 1. Copy button: morph, don't swap ---------- */
.qm-copy-btn{overflow:hidden;white-space:nowrap}
.qm-copy-check{display:inline-grid;place-items:center;margin-inline-end:4px;vertical-align:-2.5px}
.qm-copy-check svg{display:block}
.qm-copy-check path{stroke-dasharray:22;stroke-dashoffset:22;animation:qmCheckDraw .3s .08s ease-out forwards}
@keyframes qmCheckDraw{to{stroke-dashoffset:0}}

/* ---------- 5. Stepper icons morph (minus <-> trash), qty tick ---------- */
.qm-pop{animation:qmPopIn .22s cubic-bezier(.3,1.4,.5,1)}
@keyframes qmPopIn{
  0%{transform:scale(.3);opacity:0}
  70%{transform:scale(1.18)}
  100%{transform:scale(1);opacity:1}
}

/* ---------- 6. Photos: follow 1:1 on hold-drag, spring home ---------- */
.qm-photo-drag{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.qm-photo-hold{position:relative;z-index:6;cursor:grab}
.qm-photo-lifted{box-shadow:0 12px 32px rgba(18,20,31,.35);border-radius:12px}

@media (prefers-reduced-motion: reduce){
  .qm-mfield::after{transition:none}
  .qm-pin-drop,.qm-step-wake,.qm-pop{animation:none}
  .qm-copy-check path{animation:none;stroke-dashoffset:0}
}
