/* Task completion animations */

.task-checkbox {
  transition: all 0.3s ease;
}

.task-checkbox--completing {
  animation: checkbox-fill 0.3s ease forwards;
}

@keyframes checkbox-fill {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Sparkle effect on checkbox */
.task-checkbox--completing::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  animation: sparkle 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes sparkle {
  0% {
    box-shadow: 0 0 0 0 oklch(0.75 0.18 60 / 0.4);
  }
  100% {
    box-shadow: 0 0 0 8px oklch(0.75 0.18 60 / 0);
  }
}

/* Task row fade after completion */
.task-row--completing {
  transition: opacity 0.3s ease;
  opacity: 0.4;
}

/* Task row slide out */
.task-row--sliding-out {
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease,
    margin 0.3s ease,
    padding 0.3s ease;
  max-height: 0 !important;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

/* Group chevron rotation — only transition, rotate handled by Tailwind's rotate-90 */
.task-group-chevron {
  transition: transform 0.2s ease;
}

/* Undo toast transition */
.undo-toast {
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
