/* RZ — floating background-music control (assets/js/bg-music.js).
   Only injected once the audio file is confirmed to exist. */

.rzmus {
  position: fixed;
  right: clamp(16px, 2.5vw, 28px);
  bottom: clamp(16px, 2.5vw, 28px);
  z-index: 900;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(11, 22, 34, .14);
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #0B1622;
  box-shadow: 0 6px 20px -8px rgba(11, 22, 34, .3);
  transition: transform .35s cubic-bezier(.22, .61, .36, 1),
              box-shadow .35s cubic-bezier(.22, .61, .36, 1),
              background .35s ease;
}

.rzmus:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -10px rgba(11, 22, 34, .42);
}

.rzmus:focus-visible {
  outline: 2px solid #13335A;
  outline-offset: 3px;
}

/* the speaker mark, shown while muted */
.rzmus__off { width: 19px; height: 19px; }
.rzmus.on .rzmus__off { display: none; }

/* equaliser bars, shown while playing */
.rzmus__bars {
  display: none;
  align-items: flex-end;
  gap: 2.5px;
  height: 16px;
}
.rzmus.on .rzmus__bars { display: flex; }

.rzmus__bars i {
  width: 2.5px;
  border-radius: 1px;
  background: currentColor;
  animation: rzmusBar .9s ease-in-out infinite;
}
.rzmus__bars i:nth-child(1) { height: 40%; animation-delay: -.5s; }
.rzmus__bars i:nth-child(2) { height: 85%; animation-delay: -.2s; }
.rzmus__bars i:nth-child(3) { height: 60%; animation-delay: -.7s; }
.rzmus__bars i:nth-child(4) { height: 95%; animation-delay: -.35s; }

@keyframes rzmusBar {
  0%, 100% { transform: scaleY(.35); }
  50%      { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .rzmus, .rzmus__bars i { transition: none; animation: none; }
}
