/* ==========================================================================
   AUDIO PLAYER HERO SECTION
   ========================================================================== */

#player-container {
  position: relative;
  width: 430px;
  max-width: 100%;
  height: 100px;
  margin: 60px auto 0 auto;
  z-index: 10;
  text-align: left;
  /* Keep text formatting internal */
}

#player {
  position: relative;
  height: 100%;
  z-index: 3;
}

#player-track {
  position: absolute;
  top: 0;
  right: 15px;
  left: 15px;
  padding: 13px 22px 10px 184px;
  background-color: var(--couleur-navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 15px 15px 0 0;
  border: 1px solid transparent;
  transition: 0.3s ease top, 0.3s ease opacity;
  z-index: 1;
  opacity: 0;
}

#player-track.active {
  top: -92px;
  opacity: 1;
}

#album-name {
  color: var(--provence-violet);
  font-size: 17px;
  font-weight: bold;
  font-family: var(--police-titre);
}

#track-name {
  color: var(--couleur-texte-secondaire);
  font-size: 13px;
  margin: 2px 0 13px 0;
  font-family: var(--police-texte);
}

#track-time {
  height: 12px;
  margin-bottom: 3px;
  overflow: hidden;
  font-family: var(--police-texte);
}

#current-time {
  float: left;
}

#track-length {
  float: right;
}

#current-time,
#track-length {
  color: transparent;
  font-size: 11px;
  background-color: transparent;
  border-radius: 10px;
  transition: 0.3s ease all;
}

#track-time.active #current-time,
#track-time.active #track-length {
  color: var(--provence-violet);
  background-color: transparent;
}

#seek-bar-container,
#seek-bar {
  position: relative;
  height: 4px;
  border-radius: 4px;
}

#seek-bar-container {
  background-color: rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

[data-theme="dark"] #seek-bar-container {
  background-color: rgba(255, 255, 255, 0.1);
}

#seek-time {
  position: absolute;
  top: -29px;
  color: #fff;
  font-size: 12px;
  white-space: pre;
  padding: 5px 6px;
  border-radius: 4px;
  display: none;
  background-color: var(--provence-violet);
}

#s-hover {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  opacity: 0.2;
  z-index: 2;
  background-color: var(--provence-violet);
}

#seek-bar {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background-color: var(--provence-jaune);
  transition: 0.2s ease width;
  z-index: 1;
}

#player-content {
  position: relative;
  height: 100%;
  background-color: var(--couleur-navbar-bg);
  /* Apple glass affect */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid transparent;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  z-index: 2;
}

[data-theme="dark"] #player-content {
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

#album-art {
  position: absolute;
  top: -40px;
  width: 115px;
  height: 115px;
  margin-left: 40px;
  transform: rotateZ(0);
  transition: 0.3s ease all;
  box-shadow: 0 0 0 5px var(--couleur-fond);
  border-radius: 50%;
  overflow: hidden;
}

#album-art.active {
  top: -60px;
  box-shadow: 0 0 0 4px var(--couleur-fond), 0 30px 50px -15px rgba(0, 0, 0, 0.2);
}

#album-art:before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  width: 20px;
  height: 20px;
  margin: -10px auto 0 auto;
  background-color: var(--couleur-fond);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--couleur-navbar-border);
  z-index: 2;
}

#album-art img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: -1;
  object-fit: cover;
}

#album-art img.active {
  opacity: 1;
  z-index: 1;
}

#album-art.active img.active {
  z-index: 1;
  animation: rotateAlbumArt 3s linear 0s infinite forwards;
}

@keyframes rotateAlbumArt {
  0% {
    transform: rotateZ(0);
  }

  100% {
    transform: rotateZ(360deg);
  }
}

#buffer-box {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 13px;
  color: var(--couleur-texte);
  font-size: 13px;
  font-family: var(--police-titre);
  text-align: center;
  font-weight: bold;
  line-height: 1;
  padding: 6px;
  margin: -12px auto 0 auto;
  background-color: var(--couleur-navbar-border);
  opacity: 0;
  z-index: 2;
  border-radius: 4px;
}

#album-art img,
#buffer-box {
  transition: 0.1s linear all;
}

#album-art.buffering img {
  opacity: 0.25;
}

#album-art.buffering img.active {
  opacity: 0.8;
  filter: blur(2px);
  -webkit-filter: blur(2px);
}

#album-art.buffering #buffer-box {
  opacity: 1;
}

#player-controls {
  width: 250px;
  height: 100%;
  margin: 0 5px 0 141px;
  float: right;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.control {
  width: 33.333%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.button {
  width: 26px;
  height: 26px;
  padding: 20px;
  background-color: transparent;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.2s ease all;
}

.button i {
  display: block;
  color: var(--couleur-texte-secondaire);
  font-size: 20px;
  text-align: center;
  line-height: 1;
  transition: 0.2s ease all;
}

.button:hover {
  background-color: var(--provence-jaune);
}

.button:hover i {
  color: black;
}

@media screen and (max-width: 480px) {
  #player-container {
    width: 100%;
    transform: scale(0.9);
    /* Slight scale down to fit tight mobiles */
  }
}