:root {
  --dark-blue: #193746;
  --light-blue: #5ea3b1;
  --turquoise: #08e8de;
  --grey: rgb(108, 105, 105);
  --dark-grey: #222831;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

html {
  font-size: 10px;
}

body {
  background: rgb(33, 33, 33);
}

p {
  font-size: 1.6rem;
  line-height: 1.5;
}

img {
  width: 100%;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrapper {
  position: relative;
  background: rgb(242, 243, 239);
  width: 35rem;
  border-radius: 5px;
  margin-top: 6vh;
  padding: 0 1rem 0 1rem;
  overflow: hidden;
  padding-top: 1vh;
}

.header {
  /* for both player and book list */
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.header h2 {
  font-size: 2rem;
  font-weight: 400;
  margin: 1rem;
  text-align: center;
}

.header > .title {
  margin-left: -0.5rem;
}

.gotoBookslist {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.gotoPartslist {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.partslistLabel {
  text-align: right;
  margin-right: 10px;
  position: relative;
  top: 7px;
}
.booklistLabel {
  margin-left: 10px;
}

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 48;
  background: rgb(242, 243, 239);
  color: black;
}
.material-symbols-outlined.arrow,
.material-symbols-outlined.show-parts,
.material-symbols-outlined.close,
.mute,
.volume-up,
.partslist-close {
  cursor: pointer;
}

.material-symbols-outlined.icons-med {
  font-size: 3rem;
}
.material-symbols-outlined.icons-large {
  font-size: 4rem;
}
.material-symbols-outlined.mute {
  background: rgb(118, 42, 42);
  color: white;
  margin-right: 10px;
  padding: 5px;
  border-radius: 10px;
}
.material-symbols-outlined.volume-up {
  background: rgb(50, 104, 68);
  color: white;
  margin-left: 10px;
  padding: 5px;
  border-radius: 10px;
}
.material-symbols-outlined.play {
  font-size: 5rem;
}
.material-symbols-outlined.white {
  color: white;
  background-color: rgba(0, 0, 0, 0);
}
.material-symbols-outlined.close,
.partslist-close {
  color: white;
  background-color: rgba(0, 0, 0, 0);
}

.books-stack-img {
  width: 32px;
  cursor: pointer;
}

/* Details */
.details {
  text-align: center;
  margin: 2rem 0;
}

.details img {
  margin-bottom: 1rem;
  height: 45rem;
  width: auto;
}

.details .title {
  font-size: 1.9rem;
  font-weight: 700;
}

.by {
  font-size: 1.2rem;
}

.details .author {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--dark-blue);
}
.details .narrator {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--light-blue);
}

.player {
  background: var(--dark-grey);
  border-radius: 5rem 5rem 0 0;
  padding: 2rem 1rem;
}

#part-name {
  color: rgb(242, 243, 239);
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.6rem;
}

/* Controls */
/* Buttons -- prev track ... play ... last track */
.buttons {
  text-align: center;
  margin: 2rem auto;
  width: 90%;
  padding: 5px 0;
  background: white;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.buttons > * {
  border: none;
  outline: none;
  background: white;
  padding: 0.7rem;
  cursor: pointer;
  color: var(--dark-grey);
}

@media (max-width: 350px) {
  .buttons > * {
    padding: 0.5rem;
  }
  .buttons {
    padding: 0;
  }
}

.buttons > .playpause-track {
  font-size: 5rem;
  padding: 0;
  margin: 0;
}

.playpause-track,
.prev,
.next {
  opacity: 0.8;

  /* Smoothly transition the opacity */
  transition: opacity 0.2s;
}

/* Change the opacity when mouse is hovered */
.playpause-track:hover,
.prev:hover,
.next:hover {
  opacity: 1;
}

/* Time counters around the duration slider */
.current-time,
.total-duration {
  color: white;
  font-size: 1.1rem;
}

/* SLIDERS */

/* Contains time counters & .seek-slider input and the vol btns and .volume-slider input */
.slider-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

input[type="range"] {
  width: 70%;
}

.volume-slider input[type="range"] {
  width: 50%;
}

/* Books List - Overlay Window */
.audiobook-list {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.9);
  width: 100%;
  height: 100%;
  transform: translateX(-100%);
  transition: all 0.5s;
}

.playlist-header {
  color: white;
  padding: 5px 0;
  border-bottom: 1px solid var(--grey);
}

/* Books List Scroll Bar   -- 36 min into 2nd vid JavaScript Music Player Tutorial, ZinoTrust Academy */
#book-div {
  width: 100%;
  height: 80vh;
  overflow-y: scroll;
}

#book-div::-webkit-scrollbar {
  height: 0.1px;
  width: 0.1px;
}

#book-div::-webkit-scrollbar-track {
  --webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

#book-div::-webkit-scrollbar-thumb {
  background-color: var(--dark-blue);
}

.audiobook-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: white;
  border-bottom: 1px solid var(--grey);
  padding: 10px 0;
}

.audiobook-item p {
  width: 90%;
  font-size: 1.4rem;
  cursor: pointer;
}

.audiobook-item > img {
  width: 15rem;
}
.audiobook-item > .book-name {
  font-size: 2.5rem;
  text-align: center;
  color: var(--turquoise);
  margin: 7px 0 3px 0;
}
.audiobook-item > .list-author {
  text-align: center;
  margin-bottom: 8px;
}

.parts-list {
  position: absolute;
  top: 0;
  left: 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.9);
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: all 0.5s;
}

.partsList-item {
  color: white;
  cursor: pointer;
}

/* MEDIA QUERIES */
@media only screen and (max-width: 360px) {
  .wrapper {
    margin-top: 10vh;
    padding-top: 5vh;
  }
}
