.playerContainer{
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-inline: auto;
  z-index: 4;
  width: 239px;
  height: clamp(84px, 13vh, 94px);
}

.playerContainer::before{
  content: '';
  position: absolute;
  left: 5.6px;
  right: 5.6px;
  top: -3px;
  height: 3px;
  background-color: white;
  opacity: 0;

  transition: background-color 0.2s,
              opacity 0s linear 0.13s;
}

.playerTooltip{
  position: absolute;
  left: calc(100% + 10px);
  top: 4%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  background-color: black;
  color: white;
  font-size: 0.9rem;
  opacity: 0;
  padding: 0.04rem 0.5rem 0.3rem;
  border-radius: 4px;

  transition: opacity 0.15s;
  transition-delay: 0s;
}

.playerTooltip::before{
  content: '';
  position: absolute;
  width: 0.6rem;
  height: 0.6rem;
  background-color: black;
  left: -5%;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.transitionContainer{
  overflow: hidden;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
}

.playerBox{
  position: relative;
  transform: translateY(-105%);
  pointer-events: none;

  width: 231px;
  height: clamp(80px, 12vh, 90px);
  height: clamp(80px, 12dvh, 90px);
  box-shadow: 0px 3px 3px 1px rgba(0, 0, 0, 0.15);
  background-color: white;
  border-radius: 0px 0px 11px 11px;
  border: 2px solid #afafaf;
  border-top: none;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;

  transition: transform 0.2s,
              background-color 0.2s, border 0.2s, box-shadow 0.2s;
}

.playerBox.shown{
  pointer-events: auto;
  transform: translateY(0%);
}

.playerContainer:has(.playerBox.shown)::before{
  opacity: 1;
  transition-delay: 0s;
}

@keyframes runningText{
  from {transform: translateX(0);}
  to {transform: translateX(-50%);}
}

.trackNameBox{
  width: 192px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.trackMove{
  display: flex;
  width: max-content;
  margin-inline: auto;
}

.trackMove.animated span{
  padding-right: 35px;
}

.playerBox.shown .trackMove.animated{
  animation-name: runningText;
  animation-timing-function: linear;
  animation-delay: 0.2s;
  animation-iteration-count: infinite;
  margin-inline: 0;
}

.trackName{
  color: #f59300;
  font-size: 1.2rem;
  font-weight: 500;

  transition: color 0.2s;
}

.trackDurationContainer{
  display: flex;
  align-items: center;
  gap: 5px;
}

.timerContainer{
  position: relative;
  width: 29px;
  height: 20px;
}

.timer{
  color: grey;
  position: absolute;
  left: 0px;
  bottom: 0px;

  transition: color 0.2s;
}

.playerSlider{
  appearance: none;
  -webkit-appearance: none;
  --progress: 0%;
  background-color: transparent;
  cursor: pointer;
  width: 130px;
}

/* firefox */

.playerSlider::-moz-range-track{
  background-color: #afafaf;
  height: 5.23px;
  border-radius: 9999px;

  transition: background-color 0.2s;
}

.playerSlider::-moz-range-thumb{
  opacity: 0;
}

.playerSlider::-moz-range-progress{
  height: 5.23px;
  border-radius: 9999px;
  background-color: #3e3e3e;

  transition: background-color 0.2s;
}

/* chromium based/safari */

@property --sliderColor{
  syntax: '<color>';
  inherits: false;
  initial-value: #afafaf;
}

@property --colorProgress{
  syntax: '<color>';
  inherits: false;
  initial-value: #3e3e3e;
}

.playerSlider::-webkit-slider-runnable-track {
  height: 5.23px;
  border-radius: 9999px;
  --sliderColor: #afafaf;
  --colorProgress: #3e3e3e;
  background: linear-gradient(
    to right,
    var(--colorProgress) 0%,
    var(--colorProgress) var(--progress),
    var(--sliderColor) var(--progress),
    var(--sliderColor) 100%
  );

  transition: --colorProgress 0.2s, --sliderColor 0.2s;
}

.playerSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;

  width: 1rem;
  height: 1rem;

  opacity: 0;
}

.playerSlider.volume{
  width: 0px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 90%;

  transition: width 0.15s, opacity 0.15s;
}

.playerSlider.volume.shown{
  width: 70px;
  opacity: 1;
  pointer-events: auto;
}

.trackSettings{
  display: flex;
  align-items: center;
}

.trackVolumeContainer{
  display: flex;
  align-items: center;
  position: relative;
}

.trackVolumeBtn{
  width: 30px;
  height: 30px;
  border: none;
  background-color: transparent;
  cursor: pointer;
  transform: translateY(1.5px);
}

.trackVolumeIcon{
  width: 20px;

  transition: transform 0.1s;
}

.loopBtn{
  width: 30px;
  height: 30px;
  cursor: pointer;
  background-color: transparent;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3e3e3e;
  transition: transform 0.1s;
}

.loopBtn.dark{
  color: white;
}

.loopBtn.active{
  color: #f59300;
}

.loopBtn.dark.active{
  color: #c0faff;
}

.loopIcon{
  width: 25px;
}

.trackVolumeBtn:active .trackVolumeIcon{
  transform: scale(0.85);
}

.loopBtn:active{
  transform: scale(0.85)
}

@media (max-height: 700px) {
  .loopIcon{
    width: 20px;
  }
  .loopBtn{
    width: 25px;
    height: 20px;
  }
  .trackVolumeIcon{
    width: 17px;
  }
  .trackVolumeBtn{
    width: 28px;
    height: 28px;
  }
  .trackName{
    font-size: 1rem;
  }
  .playerBox{
    gap: 0px;
  }
}