/* t22-pressticks (js\v21_pressticks.js): the pop up that ticks off what a press really did, one line after another,
   then fades by itself. The page's own tokens only; in the corner, clear of the toasts and the Send bar. */

.pt-host {
  position: fixed; right: max(16px, calc((100vw - 1280px) / 2 + 16px)); bottom: 20px; z-index: 96;
  display: grid; gap: 10px; justify-items: end; width: min(400px, calc(100% - 32px)); pointer-events: none;
}
body.job-open .pt-host { bottom: 156px; }
.pt-pop {
  pointer-events: auto; position: relative; overflow: hidden; width: 100%; box-sizing: border-box;
  display: grid; gap: 8px; padding: 12px 14px 14px; border-radius: 18px; color: var(--ink);
}
.pt-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pt-badge {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px;
  color: var(--solid); background: var(--ok);
}
.pt-pop.is-waiting .pt-badge { background: var(--info); }
.pt-pop.is-fail .pt-badge { background: var(--danger); }
.pt-title { flex: 1; min-width: 0; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.pt-keep, .pt-close { flex: none; min-height: 32px; padding: 0 8px; }
.pt-keep[aria-pressed="true"] { color: var(--brand-text); text-decoration: underline; }
.pt-close { width: 32px; padding: 0; display: inline-grid; place-items: center; }

.pt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pt-line {
  display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; line-height: 1.35rem; font-weight: 600;
  opacity: 0; transform: translateY(6px); transition: opacity var(--t-small) var(--ease-out), transform var(--t-small) var(--ease-out);
}
.pt-line.is-in { opacity: 1; transform: none; }
.pt-mark {
  flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-top: -1px; border-radius: 999px;
  color: var(--ink-3); background: var(--brand-soft);
}
.pt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pt-line.is-done .pt-mark { color: var(--solid); background: var(--ok); }
.pt-line.is-wait .pt-mark { color: var(--info); box-shadow: inset 0 0 0 1.5px var(--info); background: transparent; }
.pt-line.is-wait .pt-text { color: var(--ink-2); }
.pt-line.is-fail .pt-mark { color: var(--solid); background: var(--danger); }
.pt-line.is-fail .pt-text { color: var(--danger); }
.pt-line.is-skip .pt-text, .pt-line.is-info .pt-text { color: var(--ink-2); font-weight: 500; }

/* The tick draws itself as its line comes in (not with reduced motion). */
.pt-line.is-done .pt-ico path { stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset 320ms var(--ease-out) 120ms; }
.pt-line.is-done.is-in .pt-ico path { stroke-dashoffset: 0; }
.pt-line.is-done.is-in .pt-mark { animation: pt-pop 360ms var(--ease-pop) both; }
@keyframes pt-pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }

.pt-note, .pt-todo { margin: 0; font-size: .8125rem; line-height: 1.25rem; color: var(--ink-2); }
.pt-todo { font-weight: 700; color: var(--ink); }

/* How long before it fades: a thin line along the bottom that runs down (held while kept, hovered or focused). */
.pt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.pt-bar-fill { display: block; height: 100%; background: var(--ok); transform-origin: left center; }
.pt-pop.is-waiting .pt-bar-fill { background: var(--info); }
.pt-pop.is-kept .pt-bar { visibility: hidden; }

/* Reduced motion: every line at once, no slide, no drawn tick, no running line. */
:root[data-motion="reduced"] .pt-line { opacity: 1; transform: none; transition: none; }
:root[data-motion="reduced"] .pt-line.is-done .pt-ico path { stroke-dashoffset: 0; transition: none; }
:root[data-motion="reduced"] .pt-line.is-done.is-in .pt-mark { animation: none; }
:root[data-motion="reduced"] .pt-bar { display: none; }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="full"]) .pt-line { opacity: 1; transform: none; transition: none; }
  :root:not([data-motion="full"]) .pt-line.is-done .pt-ico path { stroke-dashoffset: 0; transition: none; }
  :root:not([data-motion="full"]) .pt-line.is-done.is-in .pt-mark { animation: none; }
  :root:not([data-motion="full"]) .pt-bar { display: none; }
}

/* A phone: under the header, clear of the Send bar and the sending card's Pull back at the bottom. */
@media (max-width: 599px) {
  .pt-host, body.job-open .pt-host { left: 12px; right: 12px; width: auto; top: calc(var(--top) + 8px); bottom: auto; justify-items: stretch; }
}

:root[data-theme="high_contrast"] .pt-pop { border: 2px solid #000000; }
:root[data-theme="high_contrast"] .pt-badge,
:root[data-theme="high_contrast"] .pt-line.is-done .pt-mark,
:root[data-theme="high_contrast"] .pt-line.is-fail .pt-mark { background: #000000; color: #FFFFFF; }
:root[data-theme="high_contrast"] .pt-line.is-wait .pt-mark { box-shadow: inset 0 0 0 2px #000000; color: #000000; }
