/* Needa Smoke motion v0.17.0 (dark-mode logo v0.18.0): shared by the customer app, the store app and the admin.
   Apple-style: quick starts, soft landings, nothing that blocks a tap. Phones with "Reduce motion" on
   get fades only (see the bottom of this file). Uses each app's own color tokens (--bg, --ink, --accent...). */
:root {
  --ns-ease: cubic-bezier(.2, .8, .2, 1);
  --ns-spring: cubic-bezier(.3, 1.25, .5, 1);
}

/* ---------- startup (plays every time an app opens, while it loads) ---------- */
.ns-splash {
  position: fixed; inset: 0; z-index: 9999; background: var(--bg, #f6f6f4); color: var(--ink, #18181b);
  display: grid; grid-template-rows: 112px 34px 20px; place-content: center; justify-items: center; align-items: center; row-gap: 12px;
}
.ns-splash .ns-badge { width: 112px; height: 112px; position: relative; animation: ns-pop .5s var(--ns-spring) both; }
.ns-splash .ns-badge svg { width: 100%; height: 100%; display: block; }
.ns-splash .lg-ring { stroke-dasharray: 100; animation: ns-ring .7s var(--ns-ease) .1s both; }
.ns-splash .lg-inner { opacity: .6; animation: ns-fade-in .5s var(--ns-ease) .35s both; }
.ns-splash .ns-word { font: 700 26px/34px "Space Grotesk", "Inter", system-ui, sans-serif; letter-spacing: -.01em; animation: ns-up .45s var(--ns-ease) .35s both; }
.ns-splash .ns-sub { font: 600 12px/20px "Inter", system-ui, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2, #5e5e66); animation: ns-up .45s var(--ns-ease) .45s both; }
.ns-splash .ns-puff { position: absolute; width: 20px; height: 13px; border-radius: 13px; background: var(--surface-2, #ecebe6); right: 10px; top: 0; animation: ns-puff 1s var(--ns-ease) .4s both; }
.ns-splash.ns-out { animation: ns-out .35s var(--ns-ease) forwards; pointer-events: none; }
body.ns-started > :not(.ns-splash):not(script):not(dialog):not(.toast) { animation: ns-fade-in .4s var(--ns-ease) both; } /* opacity only, so fixed bars inside never jump */

/* ---------- shared keyframes ---------- */
@keyframes ns-pop { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
@keyframes ns-ring { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes ns-fade-in { from { opacity: 0; } }
@keyframes ns-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ns-puff { 0% { opacity: 0; transform: translate(0, 4px) scale(.6); } 40% { opacity: .9; } 100% { opacity: 0; transform: translate(12px, -16px) scale(1.25); } }
@keyframes ns-out { to { opacity: 0; transform: scale(1.04); visibility: hidden; } }
@keyframes ns-app-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes ns-bump { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes ns-slide-down { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes ns-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #e8a33d) 55%, transparent); } 60% { box-shadow: 0 0 0 10px transparent; } }
@keyframes ns-draw { to { stroke-dashoffset: 0; } }
@keyframes ns-flip { from { transform: rotateX(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ns-halo { 0%, 100% { box-shadow: 0 0 0 0 transparent; } 50% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent, #e8a33d) 30%, transparent); } }
@keyframes ns-burst { from { transform: translate(0, 0) rotate(0); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; } }
@keyframes ns-fold { to { opacity: 0; transform: scale(.98); } }

/* ---------- pages, lists, counts ---------- */
.ns-page-in { animation: ns-up .32s var(--ns-ease) both; }
.ns-rise > :nth-child(-n+16) { animation: ns-up .42s var(--ns-ease) both; animation-delay: calc(var(--i, 0) * 35ms); } /* only the first screenful moves (v0.18.2: lighter on phones) */
.ns-bump { animation: ns-bump .45s var(--ns-spring); }
.ns-slide-in { animation: ns-slide-down .45s var(--ns-ease) both; }
.ns-pulse { animation: ns-slide-down .45s var(--ns-ease) both, ns-pulse 1.6s ease-in-out .45s infinite; }
.ns-pop { animation: ns-pop .4s var(--ns-spring) both; }
.ns-fold { animation: ns-fold .35s var(--ns-ease) forwards; }
.ns-check path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: ns-draw .35s var(--ns-ease) .05s forwards; }
.ns-flyer { position: fixed; z-index: 9000; pointer-events: none; transition: transform .6s cubic-bezier(.5, 0, .2, 1), opacity .6s var(--ns-ease); }
.ns-confetti { position: fixed; z-index: 9000; pointer-events: none; width: 0; height: 0; }
.ns-confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; animation: ns-burst 1.1s var(--ns-ease) forwards; }
.ns-digits { display: inline-flex; gap: .08em; perspective: 600px; }
.ns-digits span { display: inline-block; animation: ns-flip .55s var(--ns-ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.ns-halo { animation: ns-halo 1.6s var(--ns-ease) .6s 2; }
.ns-chart-draw .ns-line { stroke-dasharray: var(--len, 1200); stroke-dashoffset: var(--len, 1200); animation: ns-draw 1s var(--ns-ease) forwards; }
.ns-chart-draw .ns-area { animation: ns-fade-in .6s var(--ns-ease) .5s both; }
.ns-chart-draw .ns-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: ns-grow .6s var(--ns-ease) both; animation-delay: calc(min(var(--i, 0), 30) * 18ms); }
@keyframes ns-grow { from { transform: scaleY(0); } }

/* ---------- living glyphs: small loops on hover, always on for .ns-live (empty screens) ---------- */
.ns-hover:hover .a-puff, .ns-live .a-puff { animation: ns-g-puff 1.8s var(--ns-ease) infinite; transform-box: fill-box; transform-origin: center; }
.ns-hover:hover .a-flame, .ns-live .a-flame { animation: ns-g-flick .9s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
.ns-hover:hover .a-smoke, .ns-live .a-smoke { animation: ns-g-curl 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.ns-hover:hover .a-glow, .ns-live .a-glow { animation: ns-g-glow 1.4s ease-in-out infinite alternate; }
.ns-hover:hover .a-drip, .ns-live .a-drip { animation: ns-g-drip 1.6s var(--ns-ease) infinite; transform-box: fill-box; transform-origin: 50% 0; }
.ns-hover:hover .a-bob, .ns-live .a-bob { animation: ns-g-bob 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.ns-live > .ns-g, .ns-live.ns-bob-all .ns-g { animation: ns-g-bob 2.4s ease-in-out infinite; }
@keyframes ns-g-puff { 0% { opacity: .2; transform: translate(-2px, 2px) scale(.7); } 50% { opacity: 1; } 100% { opacity: 0; transform: translate(3px, -4px) scale(1.15); } }
@keyframes ns-g-flick { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(.9, 1.12) rotate(3deg); } }
@keyframes ns-g-curl { 0% { opacity: 0; transform: translateY(2px) scaleY(.8); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(-4px) scaleY(1.1); } }
@keyframes ns-g-glow { from { filter: none; } to { filter: drop-shadow(0 0 3px #ffb347) brightness(1.2); } }
@keyframes ns-g-drip { 0%, 30% { transform: none; opacity: 1; } 75% { transform: translateY(4px) scaleY(1.1); opacity: 0; } 100% { opacity: 0; } }
@keyframes ns-g-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.ns-empty-g { display: grid; place-items: center; margin: 0 auto 6px; }

/* ---------- everywhere ---------- */
.btn, button.chip, .chip { transition: transform .12s var(--ns-ease), background-color .2s var(--ns-ease), color .2s var(--ns-ease), border-color .2s var(--ns-ease), box-shadow .2s var(--ns-ease); }
.btn:active:not(:disabled), .chip:active { transform: scale(.96); }
.toast { transition: opacity .3s var(--ns-ease), transform .35s var(--ns-ease) !important; }
dialog[open] { animation: ns-modal-in .3s var(--ns-ease); }
dialog[open]::backdrop { animation: ns-fade-in .3s var(--ns-ease); }
@keyframes ns-modal-in { from { opacity: 0; transform: scale(.96) translateY(6px); } to { opacity: 1; transform: none; } }
input[type="checkbox"], input[type="radio"] { transition: transform .12s var(--ns-ease); }
input[type="checkbox"]:active, input[type="radio"]:active { transform: scale(.9); }
.progress-bar > *, .setup-bar > *, [data-ns-progress] { transition: width .8s var(--ns-ease); }

/* ---------- Reduce motion: fades only, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .15s !important; }
  .ns-splash .lg-ring { stroke-dashoffset: 0; }
}
.bar-fill { transition: width .8s var(--ns-ease); }

/* ---------- v0.18.0: dark-mode logo ---------- */
.ns-splash .ns-badge svg.ns-logo-dk { display: none; }
.ns-splash .lg-inner-dk { opacity: .45; }
@media (prefers-color-scheme: dark) {
  .ns-splash .ns-badge svg.ns-logo-lt { display: none; }
  .ns-splash .ns-badge svg.ns-logo-dk { display: block; }
  /* every logo image in the apps swaps to the dark badge (browsers that can't, keep the light one) */
  img[src$="icons/logo.svg"] { content: url("/shop/icons/logo-dark.svg"); }
}
