/* ── TASK COMPLETION CELEBRATIONS ─────────────────────── */

/* Task completion toast */
.task-toast {
  position: fixed;
  top: calc(var(--topbar-h, 56px) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: linear-gradient(135deg, #059669, #10B981);
  color: white;
  padding: 12px 28px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  box-shadow: 0 4px 24px rgba(16, 185, 129, 0.35);
  z-index: 600;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}
.task-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.task-toast-icon {
  font-size: 18px;
}

/* Enhanced dot celebration pulse */
@keyframes dotCelebrate {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); }
  30% { transform: scale(1.8); box-shadow: 0 0 12px 4px rgba(52, 211, 153, 0.4); }
  60% { transform: scale(1.2); box-shadow: 0 0 6px 2px rgba(52, 211, 153, 0.2); }
  100% { transform: scale(1); box-shadow: 0 0 6px rgba(52, 211, 153, 0.4); }
}
.prog-dot.celebrate {
  animation: dotCelebrate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Mini confetti burst */
.mini-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 500;
}
.mini-confetti-piece {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: miniConfettiBurst 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mini-confetti-piece:nth-child(1) { background: #34D399; --tx: -20px; --ty: -30px; }
.mini-confetti-piece:nth-child(2) { background: #3B82F6; --tx: 20px; --ty: -25px; }
.mini-confetti-piece:nth-child(3) { background: #F59E0B; --tx: -15px; --ty: 20px; }
.mini-confetti-piece:nth-child(4) { background: #8B5CF6; --tx: 25px; --ty: 15px; }
.mini-confetti-piece:nth-child(5) { background: #EC4899; --tx: 0px; --ty: -35px; }
.mini-confetti-piece:nth-child(6) { background: #14B8A6; --tx: -25px; --ty: 5px; }

@keyframes miniConfettiBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .task-toast { transition: opacity 0.1s; }
  .prog-dot.celebrate { animation: none; }
  .mini-confetti-piece { animation: none; opacity: 0; }
}
