/* shared/walkhelp.css - the help panel on a silent first walk note
   (shared/walkhelp.js). docs/previews/walk-help (5b351dc). Colours are tokens
   from style.css; motion is transform and opacity only. */

/* on the keyboard card, over it, no height of its own */
.c1-kb-card.wh-has-panel { overflow: hidden; }
.wh-panel {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 0.875rem;
  border-radius: inherit;
  background: var(--kb-card);
  opacity: 0;
  transition: opacity 0.22s ease;
}
.wh-panel.is-on { opacity: 1; }
.wh-row { display: flex; align-items: center; gap: 0.75rem; min-height: 0; }
.wh-anim { flex: none; display: flex; align-items: center; gap: 0.375rem; direction: ltr; }
.wh-svg { display: block; width: 4.5rem; height: 2.5rem; overflow: visible; }
.wh-aah { font-size: var(--fs-body); font-weight: 800; color: var(--lilac-1); opacity: 0.2; }
.wh-line { flex: 1 1 0; min-width: 0; font-size: var(--fs-body); font-weight: 700; line-height: 1.5; color: var(--paper-ink); }
.wh-guide { display: flex; justify-content: center; }
.wh-panel .guide { gap: 0.5rem; }

/* the picture: one key goes down, then three arcs open out beside it */
.wh-key, .wh-arc { transform-box: fill-box; }
.wh-key { transform-origin: center; }
.wh-arc { transform-origin: left center; opacity: 0; }
.wh-run .wh-key { animation: wh-kdown 3.2s ease-in-out infinite; }
.wh-run .wh-arc { animation: wh-wave 3.2s ease-out infinite; }
.wh-run .wh-arc.a2 { animation-delay: 0.18s; }
.wh-run .wh-arc.a3 { animation-delay: 0.36s; }
.wh-run .wh-aah { animation: wh-aah 3.2s ease-in-out infinite; }
@keyframes wh-kdown { 0%, 4% { transform: translateY(0); } 10%, 36% { transform: translateY(0.1875rem); } 44%, 100% { transform: translateY(0); } }
@keyframes wh-wave {
  0%, 20% { transform: scale(0.6); opacity: 0; }
  30% { transform: scale(0.85); opacity: 1; }
  60% { transform: scale(1.1); opacity: 0.7; }
  80%, 100% { transform: scale(1.25); opacity: 0; }
}
@keyframes wh-aah { 0%, 20% { opacity: 0.1; } 32%, 62% { opacity: 1; } 80%, 100% { opacity: 0.1; } }

/* the guide button shakes and its arrow pokes faster, until the panel goes */
[dir="rtl"] .wh-panel { --gp-d: -1; }
[dir="ltr"] .wh-panel { --gp-d: 1; }
.wh-run-guide .guide-btn { animation: wh-fidget 1.2s ease-in-out infinite; }
.wh-run-guide .guide-arrow { animation-duration: 0.6s; }
@keyframes wh-fidget {
  0% { transform: translateX(0) rotate(0deg); }
  12% { transform: translateX(calc(var(--gp-d, 1) * 0.1875rem)) rotate(-1.4deg); }
  25% { transform: translateX(calc(var(--gp-d, 1) * 0.375rem)) rotate(1.4deg); }
  37% { transform: translateX(calc(var(--gp-d, 1) * 0.1875rem)) rotate(-1.4deg); }
  50% { transform: translateX(0) rotate(1.4deg); }
  62% { transform: translateX(calc(var(--gp-d, 1) * -0.1875rem)) rotate(-1.4deg); }
  75% { transform: translateX(calc(var(--gp-d, 1) * -0.375rem)) rotate(1.4deg); }
  87% { transform: translateX(calc(var(--gp-d, 1) * -0.1875rem)) rotate(-1.4deg); }
  100% { transform: translateX(0) rotate(0deg); }
}

/* «دوباره بخون» in the empty foot: the foot keeps its empty height */
.c1-foot.is-empty .c1-btn.wh-again { min-height: var(--btn-h); }

/* nothing moves: one still frame, key down, the arcs and the word shown */
@media (prefers-reduced-motion: reduce) {
  .wh-panel { transition: none; }
  .wh-run .wh-key, .wh-run .wh-arc, .wh-run .wh-aah,
  .wh-run-guide .guide-btn, .wh-run-guide .guide-arrow { animation: none; }
  .wh-run .wh-key { transform: translateY(0.1875rem); }
  .wh-run .wh-arc, .wh-run .wh-aah { opacity: 1; }
}
