/* ==========================================================================
   Solares Band — songs.css
   Only /songs/ loads this. The 2016 Music page was a maroon room with a cream
   script heading; this keeps the room and rebuilds the players inside it as a
   tracklist plus one bar at the foot of the screen.
   Tokens come from site.css.
   ========================================================================== */

.music-room {
  background: var(--maroon);
}

.music-room__head {
  margin-top: var(--s-7);
}

/* Oswald, lining and tabular, for anything that is a figure: track numbers,
   durations, the clocks in the bar. Song titles stay in the serif. */
.num {
  font-family: var(--face-ui);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}
.icon .stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* --------------------------------------------------------- full sampler -- */
/* Thirteen minutes of the band's whole set, so it gets a panel of its own:
   black cut into the maroon with the cream fillet the .frame component uses. */

.sampler {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "play head"
    "play len";
  align-items: center;
  gap: var(--s-1) var(--s-4);
  margin-top: var(--s-6);
  padding: clamp(1rem, 3.5vw, 2rem);
  background: var(--black);
  box-shadow: inset 0 0 0 1px rgba(253, 248, 179, 0.5);
}

.sampler__play {
  grid-area: play;
  display: grid;
  place-items: center;
  width: clamp(4rem, 13vw, 5.5rem);
  height: clamp(4rem, 13vw, 5.5rem);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cyan);
  color: var(--black);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.sampler__play:hover { background: var(--cream); }
.sampler__play:active { transform: scale(0.96); }
.sampler__play .icon {
  width: 45%;
  height: 45%;
  margin-left: 6%;
}
.sampler__play .icon--pause { margin-left: 0; }

.sampler__head {
  grid-area: head;
  min-width: 0;
  margin: 0;
}
.sampler__len {
  grid-area: len;
  margin: 0;
  font-size: var(--step-0);
  color: rgba(253, 248, 179, 0.72);
}

/* ------------------------------------------------------------ tracklist -- */

.tracks {
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(253, 248, 179, 0.22);
}

.tracks__row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--s-2) var(--s-3);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-3);
  border-bottom: 1px solid rgba(253, 248, 179, 0.22);
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.tracks__row:hover { background: rgba(0, 0, 0, 0.32); }

.tracks__num {
  font-size: var(--step--1);
  color: rgba(253, 248, 179, 0.55);
}

.tracks__title {
  font-size: var(--step-0);
  line-height: 1.3;
  color: var(--white);
}

.tracks__len {
  font-size: var(--step--1);
  color: rgba(253, 248, 179, 0.6);
}

.tracks__play {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgba(253, 248, 179, 0.45);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background-color 150ms var(--ease), color 150ms var(--ease),
              border-color 150ms var(--ease);
}
.tracks__play:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--maroon-deep);
}
.tracks__play .icon {
  width: 1.15rem;
  height: 1.15rem;
  margin-left: 2px;
}
.tracks__play .icon--pause { margin-left: 0; }

/* The one loud state on the page: the row you are hearing turns cyan. */
.tracks__row.is-current {
  background: var(--cyan);
  color: var(--black);
}
.tracks__row.is-current:hover { background: #117895; }
.tracks__row.is-current .tracks__num,
.tracks__row.is-current .tracks__title,
.tracks__row.is-current .tracks__len { color: var(--black); }
.tracks__row.is-current .tracks__play {
  background: var(--black);
  border-color: var(--black);
  color: var(--cream);
}
.tracks__row.is-current .tracks__play:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--black);
}

.sampler.is-current { box-shadow: inset 0 0 0 2px var(--cyan); }

/* Only one glyph shows at a time; aria-pressed carries the state to both. */
.icon--pause,
.icon--muted,
[aria-pressed="true"] .icon--play,
[aria-pressed="true"] .icon--loud { display: none; }
[aria-pressed="true"] .icon--pause,
[aria-pressed="true"] .icon--muted { display: block; }

/* ----------------------------------------------------------- player bar -- */

.player {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(8, 8, 8, 0.96);
  border-top: 1px solid rgba(253, 248, 179, 0.32);
  box-shadow: 0 -1rem 2.5rem rgba(0, 0, 0, 0.6);
  padding-bottom: env(safe-area-inset-bottom);
}
.player[hidden] { display: none; }

/* The bar's content sits on the same column as the tracklist, so the play
   button lands under the list and the seek bar under the sampler panel. */
.player__inner {
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--s-2) var(--gutter) var(--s-3);
}

.player__seek {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s-2);
}

.player__clock {
  font-size: 0.8125rem;
  color: rgba(253, 248, 179, 0.7);
}

.player__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--s-3);
}

.player__controls {
  display: flex;
  align-items: center;
  gap: var(--s-1);
}

.player__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}
.player__btn:hover { color: var(--cyan); }

.player__btn--main {
  width: 3.25rem;
  height: 3.25rem;
  background: var(--cyan);
  color: var(--black);
}
.player__btn--main:hover { background: var(--cream); color: var(--maroon-deep); }
.player__btn--main .icon { width: 1.6rem; height: 1.6rem; margin-left: 2px; }
.player__btn--main .icon--pause { margin-left: 0; }

.player__now {
  min-width: 0;
  margin: 0;
  font-size: var(--step--1);
  line-height: 1.3;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__volume { display: none; }

/* ---------------------------------------------------------------- range -- */

.seek {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.75rem;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.seek::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--cyan) var(--pct, 0%), rgba(253, 248, 179, 0.28) var(--pct, 0%));
}
.seek::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
}
.seek::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(253, 248, 179, 0.28);
}
.seek::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--cyan);
}
.seek::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: var(--cream);
}

/* ----------------------------------------------------------- wide views -- */

@media (min-width: 48em) {
  .sampler {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "play head len";
    gap: var(--s-5);
  }
  .sampler__len { font-size: var(--step-1); }

  .tracks__row {
    grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
    gap: var(--s-4);
    padding-block: var(--s-3);
  }
  .tracks__title { font-size: var(--step-1); }

  .player__row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .player__now { font-size: var(--step-0); }

  .player__volume {
    display: flex;
    align-items: center;
    gap: var(--s-1);
    width: 10.5rem;
  }
  .player__btn--vol { flex: none; }
  .seek--vol { height: 2.25rem; }
}
