/* Small visual flash when UI sound plays */
@keyframes uiSoundFlash {
  0% {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  }
  40% {
    transform: scale(1.06);
    box-shadow: 0 14px 30px rgba(2, 6, 23, 0.12);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 6px 18px rgba(2, 6, 23, 0.06);
  }
}

.ui-sound-flash {
  animation: uiSoundFlash 300ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* UI Sound Toggle Button Styling */
#uiSoundToggleBtn,
#mobileUiSoundToggleBtn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background-color: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  color: var(--bs-secondary);
}

#uiSoundToggleBtn:hover,
#mobileUiSoundToggleBtn:hover {
  background-color: var(--bs-gray-200);
  border-color: var(--bs-secondary);
  color: var(--bs-dark);
}

#uiSoundToggleBtn i,
#mobileUiSoundToggleBtn i {
  font-size: 1.1rem;
}

#uiSoundToggleBtn.muted,
#mobileUiSoundToggleBtn.muted {
  color: var(--bs-gray-500);
  background-color: var(--bs-gray-100);
}

@media (max-width: 991.98px) {
  .sound-nav-item {
    order: -1; /* Move it to first in mobile if desired, or keep default */
    margin-bottom: 1rem;
    padding-left: 0.5rem;
  }

  #uiSoundToggleBtn {
    width: 42px;
    height: 42px;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ui-sound-flash {
    animation: none !important;
  }
}
