/* Ambient Volume Controls Modal */
.ambient-controls-modal {
  max-width: 500px;
  max-height: 90vh;
}

.ambient-volume-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem;
}

.ambient-volume-body::-webkit-scrollbar {
  width: 8px;
}

.ambient-volume-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.ambient-volume-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.ambient-volume-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Volume Section */
.volume-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.volume-section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.5);
  letter-spacing: 0.1em;
  margin: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Volume Control Row */
.volume-control-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: background 0.2s ease;
}

.volume-control-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.volume-control-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 140px;
  color: var(--clr-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.volume-control-label svg {
  flex-shrink: 0;
  color: rgba(241, 245, 249, 0.6);
}

/* Volume Slider */
.volume-slider {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--clr-light);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--clr-light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

.volume-slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Volume slider with value gradient */
.volume-slider::-webkit-slider-runnable-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.volume-slider::-moz-range-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.volume-percentage {
  min-width: 45px;
  text-align: right;
  font-size: 0.85rem;
  color: rgba(241, 245, 249, 0.7);
  font-weight: 500;
}

/* Sound Category */
.sound-category {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.sound-category-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
}

.sound-category-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.sound-category-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-light);
}

.category-refresh-btn {
  background: transparent;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: rgba(241, 245, 249, 0.5);
  transition: all 0.2s ease;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--clr-light);
  transform: rotate(180deg);
}

/* Sound Items */
.sound-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-left: 0.5rem;
}

.sound-row {
  padding: 0.5rem 0.75rem;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
}

.sound-row:hover {
  border-left-color: rgba(255, 255, 255, 0.15);
}

.sound-row .volume-control-label {
  min-width: 120px;
  font-size: 0.85rem;
  font-weight: 400;
}

/* Info Icon */
.info-icon {
  font-size: 0.9rem;
  color: rgba(241, 245, 249, 0.4);
  cursor: help;
  margin-left: 0.5rem;
}

/* Volume button in music player */
#ambient-volume-btn {
  position: relative;
}

#ambient-volume-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transition: width 0.3s ease, height 0.3s ease;
}

#ambient-volume-btn:hover::after {
  width: 100%;
  height: 100%;
}

/* Active state indicator for sounds */
.sound-row.active {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: rgba(59, 130, 246, 0.5);
}

.sound-row.active .volume-control-label {
  color: rgba(59, 130, 246, 1);
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .ambient-controls-modal {
    max-width: 95%;
    margin: 0.5rem;
  }

  .volume-control-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .volume-control-label {
    min-width: 100%;
    justify-content: space-between;
  }

  .volume-slider {
    width: 100%;
  }

  .volume-percentage {
    text-align: left;
  }

  .sound-row .volume-control-label {
    min-width: 100%;
  }

  .ambient-volume-body {
    gap: 1.5rem;
    max-height: 75vh;
  }
}

@media (max-width: 475px) {
  .ambient-volume-body {
    gap: 1.5rem;
    padding: 0.25rem;
  }

  .sound-category-header {
    padding: 0.4rem 0.6rem;
  }

  .sound-category-title {
    font-size: 0.85rem;
  }

  .volume-control-row {
    padding: 0.6rem;
  }

  .sound-row {
    padding: 0.4rem 0.6rem;
  }

  .info-icon {
    display: none;
  }
}

/* Animation for modal opening */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#ambient-volume-modal:not(.hidden) .ambient-controls-modal {
  animation: slideInUp 0.3s ease-out;
}

/* Smooth scrolling */
.ambient-volume-body {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
.volume-slider:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}

.category-refresh-btn:focus {
  outline: 2px solid rgba(59, 130, 246, 0.5);
  outline-offset: 2px;
}
