/* t22-snappy (8 Oct 2026, desk.press.snappy): every press answers within one frame (js/v21_snappy.js, js/shell.js,
   js/job.js). Classes only; nothing here applies while the switch is off (nothing adds the classes). */

/* 1. pressed at once: the button sinks the moment it is pressed, before the press's own work runs */
.snappy-pressed { transform: scale(.97); filter: brightness(.94); transition: transform 60ms ease-out, filter 60ms ease-out; }
.btn-primary.snappy-pressed, #send-btn.snappy-pressed { box-shadow: inset 0 2px 6px rgba(0, 0, 0, .25); }
.ldj-opt.snappy-pressed { border-color: var(--focus); }
.key.snappy-pressed { background: var(--glass-2); }

/* 3. Send and complete while the server checks it: the words say so ("Checking..."), the spinner keeps turning */
#send-btn[data-snappy-since] { cursor: progress; }

/* 4. the code pad: the dots pulse while the code is checked, then turn to the tick's colour once accepted */
@keyframes snappy-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.85); } }
.pad-checking .dots i.on { animation: snappy-pulse .7s ease-in-out infinite; }
.pad-checking .dots i.on:nth-child(2) { animation-delay: .1s; }
.pad-checking .dots i.on:nth-child(3) { animation-delay: .2s; }
.pad-checking .dots i.on:nth-child(4) { animation-delay: .3s; }
.pad-checking .pad, .pad-ok .pad { opacity: .55; pointer-events: none; }
.pad-ok .dots i { background: var(--ok); border-color: var(--ok); }
.pad-ok .pad-msg { color: var(--ok); display: inline-flex; align-items: center; gap: 6px; }

:root[data-theme="high_contrast"] .pad-ok .dots i { background: #000; border-color: #000; }
:root[data-theme="high_contrast"] .pad-ok .pad-msg { color: #000; }

@media (prefers-reduced-motion: reduce) {
  .snappy-pressed { transform: none; transition: none; }
  .pad-checking .dots i.on { animation: none; opacity: .6; }
}
