/* What every captured KabData screen gets on top of the app's own CSS.
   The screens themselves are written by scripts/capture-screens.mjs;
   this file and screen.js are written by hand. */
html {
  overflow: hidden;
}

/* The screen plays once the visitor sees it (screen.js sets .moves, then
   .played). Each part waits its turn, then settles into the place the app
   gave it: the keyframes only say where a part comes from. */
.moves:not(.played) :is(.part, .chart) {
  opacity: 0 !important;
}
.moves.played .part {
  animation: part-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--wait) backwards;
}
@keyframes part-in {
  from {
    opacity: 0;
    translate: 0 12px;
  }
}
/* A chart is drawn from left to right. */
.moves.played .chart {
  animation: chart-in 1.3s cubic-bezier(0.3, 0.7, 0.2, 1)
    calc(var(--wait) + 150ms) backwards;
}
@keyframes chart-in {
  from {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
  }
}

/* Kabby stays alive. */
.moves img[data-kabby] {
  animation: kabby-bob 4.5s ease-in-out infinite;
}
@keyframes kabby-bob {
  50% {
    translate: 0 -4%;
    rotate: -2deg;
  }
}

/* The pointer that shows a click, and what it clicks. */
.pointer {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483647;
  width: 30px;
  height: 30px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgb(27 18 48 / 0.35));
  transform-origin: 0 0;
  transition:
    translate 0.85s cubic-bezier(0.3, 0.7, 0.2, 1),
    opacity 0.25s,
    scale 0.15s;
}
.pointer svg {
  display: block;
  overflow: visible;
  fill: #1b1230;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.pointer.shown {
  opacity: 1;
}
.pointer.down {
  scale: 0.86;
}
.pointer.down::after {
  position: absolute;
  top: -14px;
  left: -14px;
  width: 32px;
  height: 32px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  content: "";
  animation: pointer-ring 0.4s ease-out forwards;
}
@keyframes pointer-ring {
  from {
    opacity: 0.9;
    scale: 0.3;
  }
  to {
    opacity: 0;
    scale: 1.5;
  }
}
.pressed {
  scale: 0.97;
  filter: brightness(0.93);
  transition:
    scale 0.15s,
    filter 0.15s;
}
/* An approved request leaves the queue. */
tr.leaving {
  opacity: 0;
  transition: opacity 0.35s;
}
