/* ═══════════════════════════════════════════════════════════════════════════
   Rally · assets/uiverse.css — a few Uiverse components, re-drawn in Hulo
   ---------------------------------------------------------------------------
   Source: github.com/uiverse-io/galaxy (MIT — public/vendor/uiverse/LICENSE.txt).
   Each block names the original. Every colour, radius and timing is swapped
   for a Hulo token, so nothing here can drift from the design system: the
   components add MOTION, not a new look. All motion stops under
   prefers-reduced-motion.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Pulse dot · after Uiverse "giant-shrimp-51" by Yaya12085 ───────────
   A status dot that breathes: "something is happening" (payment being checked,
   trial running, club live) without a single word to read. */
.uv-pulse {
  --uv-c: var(--brand, var(--acid));
  display: inline-block; flex: none;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--uv-c);
  animation: uv-pulse 1.6s ease-in-out infinite;
}
.uv-pulse.is-warn { --uv-c: var(--warn); }
@keyframes uv-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--uv-c) 55%, transparent); }
  100% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--uv-c) 0%, transparent); }
}

/* ── 2. Indeterminate bar · after Uiverse "wise-moose-53" by SteveBloX ─────
   "We are working on it" for things that take hours, not seconds. */
.uv-progress {
  position: relative; overflow: hidden;
  height: 6px; border-radius: var(--r-pill, 999px);
  background: var(--line);
}
.uv-progress::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 0;
  border-radius: inherit; background: var(--brand, var(--acid));
  animation: uv-progress 3.2s cubic-bezier(.4, 1.01, 1, 1) infinite;
}
@keyframes uv-progress {
  0%   { width: 0; left: 0; }
  50%  { width: 100%; left: 0; }
  100% { width: 0; left: 100%; }
}

/* ── 3. Three dots · the classic Uiverse bouncing-dots loader ──────────────
   Used inside busy buttons in place of a spinner: friendlier, reads at a
   glance as "wait". */
.uv-dots { display: inline-flex; gap: 4px; align-items: center; flex: none; }
.uv-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  animation: uv-dot 1s ease-in-out infinite;
}
.uv-dots i:nth-child(2) { animation-delay: .15s; }
.uv-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes uv-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40%           { transform: translateY(-4px); opacity: 1; }
}

/* ── 4. Morphing tick · after Uiverse "smooth-duck-62" by G4b413l ──────────
   A box that folds into a tick when chosen. Put `.uv-tick` inside a label
   right after its checkbox/radio. */
.uv-tick {
  display: inline-block; flex: none; width: 18px; height: 18px;
  border: 2px solid var(--line-strong, var(--muted));
  border-radius: 6px;
  transition: all .32s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1));
}
input:checked + .uv-tick, input:checked ~ * .uv-tick, .is-on > .uv-tick {
  width: 9px; margin-inline: 4px 5px;
  border-color: var(--brand, var(--acid));
  border-width: 0 3px 3px 0; border-radius: 0;
  transform: rotate(45deg) translate(-2px, -2px);
}

/* ── 5. Drawn check · the SVG stroke-draw check from Uiverse's success cards ─
   For "done" moments: payment reported, club live. */
.uv-check { width: 44px; height: 44px; flex: none; }
.uv-check circle { fill: none; stroke: var(--brand, var(--acid)); stroke-width: 3; stroke-dasharray: 145; stroke-dashoffset: 145; animation: uv-draw .6s var(--ease, ease) forwards; }
.uv-check path { fill: none; stroke: var(--brand, var(--acid)); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: uv-draw .35s .45s var(--ease, ease) forwards; }
@keyframes uv-draw { to { stroke-dashoffset: 0; } }

/* ── 6. Notification pop · after Uiverse notification cards ───────────────
   Toasts arrive with a small spring instead of a plain fade. */
.toast { animation: uv-toast .42s var(--ease-spring, cubic-bezier(.34, 1.56, .64, 1)) both; }
@keyframes uv-toast {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ── 7. Tap ripple · Uiverse button press ──────────────────────────────────
   Big tap targets (`.uv-tap`) sink slightly and glow on press: a clear "I felt
   that" for owners who are not sure a tap registered. */
.uv-tap { transition: transform var(--t-1, .12s) var(--ease, ease), box-shadow var(--t-2, .18s) var(--ease, ease); }
.uv-tap:active { transform: scale(.97); box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand, var(--acid)) 18%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .uv-pulse, .uv-progress::after, .uv-dots i, .toast { animation: none !important; }
  .uv-progress::after { width: 40%; }
  .uv-check circle, .uv-check path { animation: none; stroke-dashoffset: 0; }
  .uv-tick, .uv-tap { transition: none; }
}
