/* Sound / Speaker Test — tool-specific UI. Chrome comes from shared.css / utilities.css. */

.sound-tool { max-width: 620px; margin: 0 auto; }

.sound-stage {
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 28px 20px; margin-bottom: 14px;
}

.sound-play {
  font: inherit; font-weight: 700; font-size: 1.1rem;
  padding: 16px 34px; border-radius: 999px; cursor: pointer;
  color: #fff; background: var(--btn-primary); border: none;
  transition: background .15s ease, transform .05s ease;
}
.sound-play:hover { background: var(--btn-primary-h); }
.sound-play:active { transform: translateY(1px); }
[data-sound].is-playing .sound-play { background: var(--accent); }
[data-sound].is-playing .sound-play:hover { background: var(--accent-h); }

/* Speaker/wave indicator that animates while playing */
.sound-wave { display: flex; align-items: flex-end; gap: 5px; height: 40px; }
.sound-wave span {
  width: 6px; height: 10px; border-radius: 3px; background: var(--border);
}
[data-sound].is-playing .sound-wave span { background: var(--accent); animation: sw 0.9s ease-in-out infinite; }
[data-sound].is-playing .sound-wave span:nth-child(2){ animation-delay:.15s }
[data-sound].is-playing .sound-wave span:nth-child(3){ animation-delay:.30s }
[data-sound].is-playing .sound-wave span:nth-child(4){ animation-delay:.45s }
[data-sound].is-playing .sound-wave span:nth-child(5){ animation-delay:.60s }
@keyframes sw { 0%,100%{ height:10px } 50%{ height:40px } }
@media (prefers-reduced-motion: reduce) { [data-sound].is-playing .sound-wave span { animation: none; height: 26px; } }

.media-status {
  text-align: center; font-size: .95rem; font-weight: 500; color: var(--muted);
  margin: 0 auto 14px; max-width: 560px; min-height: 1.4em;
}
.media-status.is-ok    { color: var(--teal-dark); font-weight: 600; }
.media-status.is-error { color: var(--accent-fg); font-weight: 600; }

/* Channel (left / both / right) segmented control */
.sound-channels {
  display: flex; gap: 8px; justify-content: center; margin: 0 auto 16px;
}
.ch-btn {
  font: inherit; font-weight: 600; font-size: .9rem; padding: 10px 22px;
  border-radius: 999px; cursor: pointer; background: var(--surface);
  color: var(--text); border: 1px solid var(--border); transition: all .15s ease;
}
.ch-btn:hover { border-color: var(--accent-light); }
.ch-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.sound-sliders { max-width: 480px; margin: 0 auto 16px; display: grid; gap: 14px; }
.sound-sliders label {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px;
  font-weight: 600; font-size: .9rem; color: var(--text);
}
.sound-sliders output {
  grid-column: 2; justify-self: end; font-family: 'JetBrains Mono', var(--mono);
  font-weight: 600; color: var(--muted); font-size: .85rem;
}
.sound-sliders input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }

.sound-presets { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sound-presets button {
  font: inherit; font-size: .82rem; font-weight: 600; padding: 7px 14px; border-radius: 999px;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--border); cursor: pointer;
}
.sound-presets button:hover { border-color: var(--accent-light); color: var(--accent); }
