/* Floating playlist */

.playlist {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  z-index: 38;
  flex-direction: column;
  min-height: 0;
  width: min(680px, calc(100% - var(--chat-column-width)));
  max-height: min(70vh, 650px);
  overflow: hidden;
  border: solid #41454f;
  border-width: 0 0 1px 1px;
  background: var(--panel-background);
}

.is-playlist-open .playlist {
  display: flex;
}

.schedule-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #353944;
}

.schedule-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.schedule-timezone {
  font-size: 12px;
  color: #bac1cf;
}

.playlist-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}

.playlist-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  grid-template-areas: "title time" "detail time";
  align-items: center;
  gap: 5px 12px;
  padding: 12px 10px;
  border-bottom: 1px solid #292d35;
}

.playlist-row.active {
  background: #202833;
  box-shadow: inset 2px 0 #9bb5d9;
}

.playlist-item-title {
  grid-area: title;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 600;
}

.playlist-start-time {
  grid-area: time;
  align-self: start;
  color: #bac1cf;
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.playlist-item-details {
  grid-area: detail;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 10px;
  color: #9ca5b4;
  font-size: 12px;
}

.playlist-item-details a {
  color: #a9c2e0;
  text-decoration: none;
}

.playlist-item-details a:hover {
  text-decoration: underline;
}

.player:not(.guest-player) .upcoming .playlist-row {
  grid-template-columns: minmax(0, 1fr) 10rem 2.2rem;
  grid-template-areas: "title time play" "detail time play";
}

.schedule-play {
  grid-area: play;
  display: grid;
  place-items: center;
  padding: 0;
  width: 30px;
  height: 30px;
}

.playlist-break {
  padding-block: 8px;
  color: #bac1cf;
  font-size: 12px;
}

.playlist-break .playlist-item-title {
  font-weight: 400;
}

.schedule-night h3 {
  margin: 18px 10px 0;
  padding-bottom: 7px;
  border-bottom: 1px solid #41454f;
  font-size: 13px;
}

@media (max-width: 960px) {
  .playlist {
    width: 100%;
    max-height: 55vh;
  }
}

@media (max-width: 480px) {
  .playlist-row,
  .player:not(.guest-player) .upcoming .playlist-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "title play" "time play" "detail play";
    gap: 3px 8px;
  }

  .playlist-start-time {
    text-align: left;
  }
}

.schedule-rows > .upcoming-empty { margin-inline: 10px; }

.schedule-night h3 {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}

.schedule-night h3 span {
  font-weight: 400;
  color: #bac1cf;
  font-variant-numeric: tabular-nums;
}
