.audio-player-container {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 7px;
  width: 100%;
  display: none;
}

/* Now Playing Info */
.now-playing-info {
  margin-top: 5px;
  font-size: 16px;
  color: var(--main-text-color);
  text-align: center;
}

.audio-player {
  --player-button-width: 4em;
  --sound-button-width: 3em;
  --space: 0.5em;
}

.controls {
  display: flex;
  align-items: center;
  width: 100%;
  gap: var(--space); /* ensures spacing between controls */
}

/* Make the slider container fill the available space and stack its children vertically */
.slider {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* The range input takes the full width of its container */
.timeline {
  -webkit-appearance: none;
  width: 100%;
  height: 0.5em;
  background-color: #ccc;
  border-radius: 5px;
  background-size: 0% 100%;
  background-image: linear-gradient(var(--dark-background), var(--dark-background));
  background-repeat: no-repeat;
  appearance: none;
  outline: none;
}

/* Slider Thumb Styling */
/* WebKit browsers (Chrome, Safari) */
.timeline::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background-color: var(--dark-background);
  cursor: pointer;
  border: none;
  outline: none;
}

/* Firefox */
.timeline::-moz-range-thumb {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background-color: var(--dark-background);
  cursor: pointer;
  border: none;
  outline: none;
}

/* Internet Explorer and Edge */
.timeline::-ms-thumb {
  width: 1em;
  height: 1em;
  border-radius: 50%;
  background-color: var(--dark-background);
  cursor: pointer;
  border: none;
  outline: none;
}


/* Remove default track styling */
.timeline::-webkit-slider-runnable-track,
.timeline::-moz-range-track,
.timeline::-ms-track {
  -webkit-appearance: none;
  box-shadow: none;
  border: none;
  background: transparent;
}

/* Style the time info (positioned right below the slider) */
.now-playing-info {
  text-align: center;
  font-size: 1em;
  margin-top: 0.25em;
}

.player-button,
.sound-button {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.player-button {
  width: var(--player-button-width);
  height: var(--player-button-width);
}

.sound-button {
  width: var(--sound-button-width);
  height: var(--sound-button-width);
}
