/* Soundscape button in the hub header (assets/audio.js). Prefix: au-
 * The button itself is a core .sx-iconbtn; this only adds the pressed look and the tiny "playing" bars.
 * Colours come from the tokens, so it follows both themes.
 */
.au-btn{position:relative}
.au-btn .au-ico{transition:transform .25s var(--sx-ease)}
.au-btn[aria-pressed="true"]{color:var(--accent,var(--sx-accent));border-color:color-mix(in srgb,var(--accent,var(--sx-accent)) 60%,transparent)}
.au-btn[aria-pressed="true"] .au-ico{transform:translateY(-3px) scale(.88)}

/* four little level bars under the wave: hidden when off, still and faint when armed, moving while sound plays */
.au-bars{position:absolute;left:50%;bottom:5px;width:14px;height:6px;margin-left:-7px;display:flex;align-items:flex-end;justify-content:space-between;
  opacity:0;transition:opacity .3s;pointer-events:none}
.au-bars i{display:block;width:2px;height:100%;border-radius:1px;background:currentColor;transform-origin:50% 100%;transform:scaleY(.34)}
.au-bars i:nth-child(1){--au-rest:.5}
.au-bars i:nth-child(2){--au-rest:1}
.au-bars i:nth-child(3){--au-rest:.67}
.au-bars i:nth-child(4){--au-rest:.34}
.au-btn[data-au-state="armed"] .au-bars{opacity:.55}
.au-btn[data-au-state="on"] .au-bars{opacity:1}
.au-btn[data-au-state="on"] .au-bars i{transform:scaleY(var(--au-rest,.6));animation:au-bar 1.5s ease-in-out infinite alternate}
.au-btn[data-au-state="on"] .au-bars i:nth-child(1){animation-duration:1.3s;animation-delay:-.4s}
.au-btn[data-au-state="on"] .au-bars i:nth-child(2){animation-duration:1.7s;animation-delay:-1.1s}
.au-btn[data-au-state="on"] .au-bars i:nth-child(3){animation-duration:1.1s;animation-delay:-.7s}
.au-btn[data-au-state="on"] .au-bars i:nth-child(4){animation-duration:1.9s;animation-delay:-.2s}
@keyframes au-bar{from{transform:scaleY(.25)}to{transform:scaleY(1)}}

/* reduced motion: the bars still say "playing", they just hold still */
:root[data-motion="reduce"] .au-btn .au-ico{transition:none}
:root[data-motion="reduce"] .au-bars{transition:none}
:root[data-motion="reduce"] .au-btn[data-au-state="on"] .au-bars i{animation:none}

@media print{.au-btn{display:none}}
