/* ========================================
   MOTION LAYER
   Shared keyframes, shimmer loaders, illustrated empty states, and a
   subtle shine animation for the badges-page progress bars. Honors
   prefers-reduced-motion.

   The XP chip / streak flame / daily challenge / celebration overlay /
   confetti / XP float blocks were removed after user feedback on the
   gamification layer — kept minimal animation primitives only.
   ======================================== */

/* ---------- Keyframes ---------- */

@keyframes toast-slide {
  from { transform: translate(-50%, 20px); }
  to   { transform: translate(-50%, 0); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ---------- Skeleton loader ---------- */

.skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    var(--c-surface-2) 25%,
    var(--c-border) 50%,
    var(--c-surface-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer var(--motion-shimmer) infinite;
  border-radius: var(--r-2);
  min-height: 16px;
}
.skeleton-title { height: 20px; width: 60%; margin-bottom: 8px; }
.skeleton-line  { height: 14px; width: 90%; margin-bottom: 6px; }
.skeleton-line.short { width: 40%; }
.skeleton-card  { height: 120px; border-radius: var(--r-3); }
.skeleton-circle{ width: 48px; height: 48px; border-radius: 50%; }

/* ---------- Illustrated empty state ---------- */

/* Standalone empty state (full page, /find-work, /my-tasks, etc.) — vertical,
   illustrated. Scoped via .panel-list > .empty so the inline .panel .empty
   variant below stays compact for dashboard panels. */
.empty-illus,
.panel-list > .empty,
.task-page > .empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--r-2);
  background: var(--grad-glass);
  border: 1px dashed var(--c-border);
  position: relative;
}
.panel-list > .empty .empty-ic,
.task-page > .empty .empty-ic {
  font-size: 28px;
  filter: drop-shadow(0 4px 10px color-mix(in oklab, var(--c-primary) 18%, transparent));
}
.panel-list > .empty .empty-title,
.panel-list > .empty h3,
.task-page > .empty .empty-title,
.task-page > .empty h3 {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: var(--fs-base);
  color: var(--c-text);
  margin: 0;
}
.panel-list > .empty .empty-sub,
.panel-list > .empty p,
.task-page > .empty .empty-sub,
.task-page > .empty p {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  margin: 0;
  max-width: 44ch;
}

/* Panel-internal empty state (Email summary, My Requests, etc. on the
   dashboard) — compact horizontal row, ~52px tall. No background, no
   border, no padding bulk — the parent .panel already owns the frame. */
.panel .empty,
.panel-body .empty {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
}
.panel .empty .empty-ic,
.panel-body .empty .empty-ic {
  width: 32px;
  height: 32px;
  font-size: 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c-primary) 14%, var(--c-surface));
  border: 0;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  filter: none;
}
.panel .empty .empty-ic img,
.panel-body .empty .empty-ic img { width: 18px; height: 18px; }
.panel .empty .empty-main,
.panel-body .empty .empty-main {
  flex: 1;
  min-width: 0;
}
.panel .empty .empty-title,
.panel-body .empty .empty-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 12px;
  color: var(--c-text);
  line-height: 1.2;
  margin: 0;
}
.panel .empty .empty-sub,
.panel-body .empty .empty-sub {
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 11px;
  color: var(--c-muted);
  line-height: 1.3;
  margin: 0;
  max-width: none;
}
.panel .empty .btn,
.panel-body .empty .btn {
  padding: 4px 10px;
  font-size: 11px;
  flex-shrink: 0;
}
.empty-illus img,
.empty-illus svg {
  width: 120px;
  height: auto;
  filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--c-primary) 12%, transparent));
}
.empty-illus .empty-illus-title {
  font-weight: 800;
  font-size: var(--fs-lg);
  color: var(--c-text);
}
.empty-illus .empty-illus-sub {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  font-weight: 600;
  max-width: 36ch;
}
