/* Blue confetti pop when a task is completed (celebrateCompletion in app.js). */
.confetti-layer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; contain: strict; }
.confetti-layer i { position: absolute; display: block; border-radius: 2px; will-change: transform, opacity; }
@media (prefers-reduced-motion: reduce) { .confetti-layer { display: none; } }

/* Finishing a task: the check pops, a line draws through the title, and the row stays for
   2 seconds (COMPLETION_HOLD_MS) before easing off to Completed. */
body.orbit-v27 .task-row.completion-hold > .task-check { animation: done-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
body.orbit-v27 .task-row.completion-hold .task-title-button,
body.orbit-v27 .focus-item.completion-hold .task-title-button { display: inline; text-decoration: none !important; background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 0% 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; animation: done-strike .45s ease-out .12s forwards; }
body.orbit-v27 .task-row.completion-hold { animation: done-leave .3s ease-in 1.7s forwards; }
@keyframes done-pop { 0% { transform: scale(.7); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes done-strike { to { background-size: 100% 2px; } }
@keyframes done-leave { to { opacity: .35; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) {
  body.orbit-v27 .task-row.completion-hold, body.orbit-v27 .task-row.completion-hold > .task-check { animation: none; }
  body.orbit-v27 .task-row.completion-hold .task-title-button { animation: none; background-size: 100% 2px; }
}

/* Every toast (Undo, Saved, Updated, notices) uses this same dark card and slide (Adi, 2026-11-03).
   Undo after completing: a compact card at the bottom right, beside the + button where the right
   thumb rests (undo icon, "Undo", then what happened). It rises in, the whole card is the button,
   and after 3 s it slides back down off the screen. */
body.orbit-v27 .toast { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; left: auto; right: 112px; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); width: max-content; min-width: 200px; max-width: min(360px, calc(100vw - 132px)); min-height: 64px; padding: 11px 18px 11px 58px; border: 1px solid var(--o-line-strong, #333338); border-radius: 12px; background: var(--o-raise, #1c1c1f); color: var(--o-ink, #f4f4f5); box-shadow: 0 10px 34px rgba(0, 0, 0, .35); font-size: 14px; text-align: left; opacity: 0; transform: translateY(calc(100% + 60px)); transition: transform .38s cubic-bezier(.55, 0, .75, .3), opacity .38s ease-in; }
body.orbit-v27 .toast.visible { opacity: 1; transform: none; animation: undo-bar-in .26s cubic-bezier(.2, .9, .3, 1.1); }
body.orbit-v27 .toast.has-undo #toastText { order: 2; color: var(--o-muted, #a1a1aa); font-size: 14px; }
body.orbit-v27 .toast.has-undo #undoAction:not([hidden]) { order: 1; position: static; display: block; min-height: 0; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--o-accent-ink, #8ec5ff); font-size: 17px; font-weight: 650; line-height: 1.3; }
body.orbit-v27 .toast.has-undo #undoAction::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
body.orbit-v27 .toast.has-undo #undoAction:active::after { background: rgba(255, 255, 255, .05); }
body.orbit-v27 .toast.has-undo .undo-icon { position: absolute; left: 18px; top: 50%; width: 24px; height: 24px; transform: translateY(-50%); color: var(--o-muted, #a1a1aa); }
body.orbit-v27 .toast:not(.has-undo) .undo-icon { display: none; }
@keyframes undo-bar-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  body.orbit-v27 .toast { left: auto; right: 88px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); min-width: 0; max-width: calc(100vw - 104px); }
}
@media (prefers-reduced-motion: reduce) {
  body.orbit-v27 .toast, body.orbit-v27 .toast.visible { animation: none; transition: opacity .2s; transform: none; }
}
html[data-theme="light"] body.orbit-v27 .toast { background: #fff; color: #111; border-color: rgba(0, 0, 0, .12); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }

/* Toasts without Undo: no icon gap, the message reads in full ink; "View task" is a quiet accent link. */
body.orbit-v27 .toast:not(.has-undo) { padding-left: 18px; }
body.orbit-v27 .toast:not(.has-undo) #toastText { color: var(--o-ink, #f4f4f5); font-size: 15px; font-weight: 600; }
body.orbit-v27 .toast #viewSavedCapture:not([hidden]) { order: 3; position: static; display: block; min-height: 0; margin: 2px 0 0; padding: 0; border: 0; background: none; color: var(--o-accent-ink, #8ec5ff); font-size: 14px; font-weight: 600; }
html[data-theme="light"] body.orbit-v27 .toast:not(.has-undo) #toastText { color: #111; }
