/* Mixer-song voting and weekly leaderboard. */

.music-vote-panel {
  right: 1rem;
  bottom: 5.2rem;
  min-width: 300px;
  max-width: min(470px, calc(100vw - 2rem));
  border-radius: 14px;
  padding: .65rem .75rem;
  display: grid;
  gap: .45rem;
}

.music-vote-track {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  min-width: 0;
}

.music-vote-track b {
  color: var(--teal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-vote-track span {
  color: var(--dim);
  font-size: .75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-vote-actions {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.vote-button {
  padding: .25rem .55rem;
  min-width: 58px;
  border-radius: 999px;
  background: #10131b;
  border: 1px solid var(--line);
  color: var(--fg);
}

.vote-button:hover:not(:disabled) {
  border-color: var(--teal);
  background: rgba(62, 207, 192, .1);
}

.vote-button.selected {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px rgba(62, 207, 192, .28) inset;
  background: rgba(62, 207, 192, .14);
}

.vote-button.down.selected {
  border-color: #ff6c81;
  box-shadow: 0 0 0 1px rgba(255, 108, 129, .25) inset;
  background: rgba(255, 108, 129, .12);
}

.vote-button:disabled {
  cursor: default;
  opacity: .55;
}

.music-vote-status {
  margin-left: auto;
  color: var(--dim);
  font-size: .72rem;
  text-align: right;
}

#leaderboards-modal .modal-box {
  width: min(760px, 100%);
}

.music-board-head {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  margin-bottom: .8rem;
}

.music-board-head h2 {
  margin: 0;
}

#music-leaderboard-list {
  display: grid;
  gap: .45rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: .2rem;
}

#music-leaderboard-list li {
  cursor: default;
}

#music-leaderboard-list li:hover {
  background: #10131b;
  border-color: var(--line);
}

.music-board-entry {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: .8rem !important;
  align-items: center;
  background: #10131b;
  border: 1px solid var(--line) !important;
}

.music-board-entry:first-child {
  border-color: rgba(255, 213, 74, .45) !important;
  background: rgba(255, 213, 74, .06);
}

.music-board-rank {
  font-weight: 800;
  color: #ffd54a;
  text-align: center;
}

.music-board-song,
.music-board-votes {
  display: grid;
  min-width: 0;
}

.music-board-song strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-board-song small,
.music-board-votes small {
  color: var(--dim);
  font-size: .74rem;
}

.music-board-votes {
  text-align: right;
  min-width: 180px;
}

.music-board-votes b {
  color: var(--teal);
  font-size: 1rem;
}

.music-board-empty {
  color: var(--dim);
  justify-content: center;
  cursor: default !important;
}

@media (max-width: 650px) {
  .music-vote-panel {
    left: 1rem;
    right: 1rem;
    min-width: 0;
  }

  .music-vote-actions {
    flex-wrap: wrap;
  }

  .music-vote-status {
    width: 100%;
    margin-left: 0;
    text-align: left;
  }

  .music-board-entry {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .music-board-votes {
    grid-column: 2;
    text-align: left;
    min-width: 0;
  }
}
