/* #region: FONTS */

@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 200;
  src: url("../assets/fonts/roboto-v49-latin_latin-ext_symbols-200.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: url("../assets/fonts/roboto-v49-latin_latin-ext_symbols-regular.woff2")
    format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Roboto";
  font-style: normal;
  font-weight: 500;
  src: url("../assets/fonts/roboto-v49-latin_latin-ext_symbols-500.woff2")
    format("woff2");
}

/* #endregion */

/* #region: AUDIO PLAYER */

.audio-player {
  width: 100%;
  max-width: 800px;
  margin: 0 auto 80px auto;
  padding: 0 20px;

  display: flex;
  flex-direction: column;
  gap: 20px;

  font-family: "Roboto Serif", serif;
  color: rgb(255, 250, 234);

  text-transform: none;
}

.player {
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  gap: 20px;
}

.player-left-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.player-cover {
  width: 200px;
  border-radius: 6px;
}

.player-right-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.player-info {
  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.player-artist p {
  font-size: var(--fs-base);
  letter-spacing: 0.1em;
}

.player-title p {
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: 0.15em;
}

.player-role p {
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  opacity: 0.55;
}

.player-controls {
  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.player-buttons {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.player-buttons-left {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.player-buttons-big {
  background-color: transparent;
  border: none;
  cursor: pointer;
  margin-right: 15px;
}

.player-buttons-big img {
  height: 30px;
  opacity: 1;
}

.player-buttons-small {
  background-color: transparent;
  border: none;
  cursor: pointer;
}

.player-buttons-small img {
  width: 25px;
  opacity: 1;
}

.player-duration {
  font-family: inherit;
  color: inherit;
  font-size: 0.9rem;
  font-weight: 200;
  margin-left: 15px;
  opacity: 0.8;
}

.player-seek-bar input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
  height: 10px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  border-radius: 4px;
}

.player-seek-bar input[type="range"]::-webkit-slider-runnable-track {
  width: 100%;
  height: 10px;
  background: linear-gradient(
    to right,
    rgb(255, 250, 234, 0.8) var(--range-value, 0%),
    rgba(255, 250, 234, 0.1) var(--range-value, 0%)
  );
}

.player-seek-bar input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  margin-top: -4px;
}

.playlist {
  width: 100%;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 15px;

  /* firefox */
  scrollbar-width: thin;
  scrollbar-color: rgb(255, 250, 234) transparent;
}

.playlist-song {
  width: 100%;
  height: 55px;

  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;

  background-color: transparent;
  border: none;
  font: inherit;
  color: inherit;

  cursor: pointer;
}

.song-left-section {
  display: flex;
  flex-direction: row;
  justify-content: left;
  align-items: center;
  text-align: left;
  gap: 30px;

  padding-left: 5px;

  opacity: 1;
}

.song-right-section {
  padding-right: 5px;

  opacity: 0.55;
}

.playlist-song:hover {
  background-color: rgba(255, 250, 234, 0.01);
}

.song-divider {
  width: 100%;
  border: none;
  background-color: rgba(255, 250, 234, 0.15);
  height: 1px;
}

/* #endregion */

/* #region: MEDIA QUERY */

@media (max-width: 768px) {
  .audio-player {
    gap: clamp(10px, calc(1.176px + 2.451vw), 20px);
    padding: 0 clamp(10px, calc(1.176px + 2.451vw), 20px);
  }

  .player {
    gap: clamp(10px, calc(1.176px + 2.451vw), 20px);
  }

  .player-cover {
    width: clamp(100px, calc(11.765px + 24.51vw), 200px);
    border-radius: clamp(3px, calc(0.353px + 0.735vw), 6px);
  }

  .player-right-section {
    gap: clamp(10px, calc(1.176px + 2.451vw), 20px);
  }

  .player-info {
    gap: 0;
  }

  .player-artist p {
    font-size: clamp(0.6rem, 0.247rem + 1.569vw, 1rem);
    letter-spacing: normal;
  }

  .player-title p {
    font-size: clamp(1rem, 0.612rem + 1.725vw, 1.44rem);
    letter-spacing: normal;
  }

  .player-role p {
    font-size: clamp(0.6rem, 0.394rem + 0.914vw, 0.833rem);
    letter-spacing: normal;
  }

  .player-controls {
    gap: 0;
  }

  .player-buttons-big {
    margin-right: clamp(10px, calc(5.588px + 1.225vw), 15px);
  }

  .player-buttons-big img {
    height: clamp(20px, calc(11.176px + 2.451vw), 30px);
  }

  .player-buttons-small {
    margin-right: 5px;
  }

  .player-buttons-small img {
    width: clamp(20px, calc(15.588px + 1.225vw), 25px);
  }

  .player-duration {
    font-size: clamp(0.8rem, 0.712rem + 0.392vw, 0.9rem);
    margin-left: clamp(10px, calc(5.588px + 1.225vw), 15px);
  }

  .player-seek-bar input[type="range"] {
    height: clamp(7px, calc(4.353px + 0.735vw), 10px);
  }

  .player-seek-bar input[type="range"]::-webkit-slider-runnable-track {
    height: clamp(7px, calc(4.353px + 0.735vw), 10px);
  }

  .playlist {
    max-height: clamp(200px, calc(182.353px + 4.902vw), 220px);

    font-size: clamp(0.8rem, 0.624rem + 0.784vw, 1rem);
    letter-spacing: normal;
  }

  .playlist-song {
    height: clamp(50px, calc(45.588px + 1.225vw), 55px);
  }

  .song-left-section {
    gap: clamp(15px, calc(1.765px + 3.676vw), 30px);
  }
}

@media (max-width: 360px) {
  .audio-player {
    margin: 0 auto 22.22vw auto;
    padding: 0 2.78vw;
    gap: 2.78vw;
  }

  .player {
    gap: 2.78vw;
  }

  .player-cover {
    width: 27.78vw;
    border-radius: 0.83vw;
  }

  .player-right-section {
    gap: 2.78vw;
  }

  .player-artist p {
    font-size: 2.67vw;
  }

  .player-title p {
    font-size: 4.44vw;
  }

  .player-role p {
    font-size: 2.67vw;
  }

  .player-buttons-big {
    margin-right: 2.78vw;
  }

  .player-buttons-big img {
    height: 5.56vw;
  }

  .player-buttons-small {
    margin-right: 1.39vw;
  }

  .player-buttons-small img {
    width: 5.56vw;
  }

  .player-duration {
    font-size: 3.56vw;
    margin-left: 2.78vw;
  }

  .player-seek-bar input[type="range"] {
    height: 1.94vw;
    border-radius: 1.11vw;
  }

  .player-seek-bar input[type="range"]::-webkit-slider-runnable-track {
    height: 1.94vw;
  }

  .player-seek-bar input[type="range"]::-webkit-slider-thumb {
    width: 3.33vw;
    height: 3.33vw;
    margin-top: -1.11vw;
  }

  .playlist {
    max-height: 55.56vw;
    padding-right: 4.17vw;

    font-size: 3.56vw;
  }

  .playlist-song {
    height: 13.89vw;
  }

  .song-left-section {
    gap: 4.17vw;
    padding-left: 1.39vw;
  }

  .song-right-section {
    padding-right: 1.39vw;
  }
}

.playlist-song.active .song-left-section {
  opacity: 0.5; /* o un colore / underline / altro indicatore */
}
/* #endregion */
