/* shared/guide.css - the spoken guide button (shared/guide.js).
   SPEC «Guide button: play and pause», board ZSingle. Colours are tokens
   from style.css; motion is transform and opacity only. */

/* an arrow at the start side, pointing at the button */
.guide { display: flex; align-items: center; gap: 0.625rem; }
.guide-arrow {
  display: inline-flex;
  color: var(--brand);
  animation: guide-poke-e 1.2s ease-in-out infinite;
  transition: opacity 0.4s ease;
}
.guide-arrow svg { display: block; width: var(--guide-arrow); height: calc(var(--guide-arrow) * 20 / 28); }
[dir="ltr"] .guide-arrow { animation-name: guide-poke-s; }
[dir="ltr"] .guide-arrow svg { transform: scaleX(-1); }
.guide-arrow.done { opacity: 0; }
.guide-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--guide-h);
  padding-block: 0.375rem;
  padding-inline: 0.5rem 1.125rem;
  border-radius: 999px;
  border: 1px solid var(--guide-edge);
  background: var(--art-white);
  box-shadow: 0 10px 24px -14px rgba(var(--mark-shadow-rgb), 0.45);
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--paper-ink);
  cursor: pointer;
}
.guide-play {
  flex: none;
  width: var(--guide-play);
  height: var(--guide-play);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lilac-0), var(--lilac-1));
  display: grid;
  place-items: center;
}
.guide-play svg { display: block; width: 0.875rem; height: 0.875rem; }
.guide-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.35; }
.guide-title { font-size: var(--fs-body); font-weight: 700; }
.guide-secs { font-size: var(--fs-small); color: var(--paper-ink-2); }
.guide-bars { display: flex; align-items: center; gap: 3px; margin-inline-start: 0.375rem; }
.guide-bars span { display: block; width: 3px; border-radius: 2px; background: var(--note-soft); transform-origin: center; }
.guide-bars span:nth-child(1) { height: 0.5rem; }
.guide-bars span:nth-child(2) { height: 1rem; background: var(--lilac-0); }
.guide-bars span:nth-child(3) { height: 0.6875rem; }
.guide-bars span:nth-child(4) { height: 1.125rem; background: var(--violet); }
.guide-bars span:nth-child(5) { height: 0.5625rem; }
/* while it plays the five bars move, one after another (paused: they stand) */
.guide-btn.playing .guide-bars span { animation: guide-bar 0.9s ease-in-out infinite; }
.guide-btn.playing .guide-bars span:nth-child(2) { animation-delay: 0.15s; }
.guide-btn.playing .guide-bars span:nth-child(3) { animation-delay: 0.3s; }
.guide-btn.playing .guide-bars span:nth-child(4) { animation-delay: 0.45s; }
.guide-btn.playing .guide-bars span:nth-child(5) { animation-delay: 0.6s; }

@keyframes guide-bar { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
@keyframes guide-poke-e { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
@keyframes guide-poke-s { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(8px); } }

/* the bars and the arrow stand still; the icon still changes */
@media (prefers-reduced-motion: reduce) {
  .guide .guide-arrow,
  .guide-btn.playing .guide-bars span { animation: none; }
}
