/* judging.css — the vote controls (like/dislike, stars) wherever a track
   row appears, and the leaderboard that aggregates them. */

/* ---- Judging: like/dislike + stars ---- */

.mu-votes {
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.mu-vote,
.mu-star {
    display: grid;
    place-items: center;
    /* The row is dense, so these sit below the 44px tap floor visually but
       keep a 44px touch target via the ::after overlay below. */
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: none;
    color: var(--label);
    cursor: pointer;
    position: relative;
    transition: color 120ms var(--ease), background-color 120ms var(--ease);
}

.mu-vote::after,
.mu-star::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: var(--tap);
    height: var(--tap);
    transform: translate(-50%, -50%);
}

.mu-vote:hover { color: var(--text); background: rgba(232, 234, 237, 0.07); }
.mu-vote--like.is-on { color: var(--mu-accent); }
.mu-vote--dislike.is-on { color: #ff6b6b; }

.mu-vote__net {
    min-width: 26px;
    text-align: center;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--blurb);
}

.mu-stars {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: 6px;
}

.mu-star { width: 22px; height: 22px; }
.mu-star:hover { color: var(--text); }
.mu-star.is-on { color: #ffc857; }

/* Hovering a star lights every star before it, the way a rating control is
   expected to behave. Pure CSS: :has() on the row, no JS hover tracking. */
.mu-stars:hover .mu-star { color: #ffc857; }
.mu-stars .mu-star:hover ~ .mu-star { color: var(--label); }

.mu-star__avg {
    margin-left: 6px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: var(--blurb);
}
.mu-star__avg--none { color: var(--label); }

@media (min-width: 761px) and (max-width: 860px) {
    /* Stars are the first thing to go on a narrow row; the reactions and the
       net score carry the signal. Bound below so the phone layout underneath
       (which also hides the index column) is the one that applies there. */
    .mu-stars { display: none; }
    .mu-track { grid-template-columns: 40px 28px minmax(0, 1fr) auto 32px 52px; }
    .mu-track__mood { display: none; }
}

/* ---- Leaderboard ---- */

.mu-lb__head { padding: 8px 0 18px; }
.mu-lb__head .mu-hero__title { display: flex; align-items: center; gap: 10px; }

.mu-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.mu-tabs__spacer { flex: 1 1 auto; }

.mu-tab {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--rule);
    border-radius: 999px;
    background: none;
    color: var(--blurb);
    font-size: 13px;
    cursor: pointer;
    transition: color 120ms var(--ease), border-color 120ms var(--ease), background-color 120ms var(--ease);
}
.mu-tab:hover { color: var(--text); }
.mu-tab.is-on {
    color: var(--mu-accent-ink);
    background: var(--mu-accent);
    border-color: var(--mu-accent);
}
.mu-tab--wide.is-on {
    /* The cross-project toggle is a state, not a selection — outline it
       rather than filling it, so it never reads as a fourth tab. */
    color: var(--mu-accent);
    background: none;
    border-color: var(--mu-accent);
}

.mu-lb { list-style: none; margin: 0; padding: 0; }

.mu-lb__row,
.mu-lb__labels {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: 6px;
    min-height: 48px;
}

.mu-lb--song .mu-lb__row,
.mu-lb--song .mu-lb__labels {
    grid-template-columns: 34px 34px minmax(0, 1fr) 130px 60px 64px;
}
.mu-lb--lyricist .mu-lb__row,
.mu-lb--lyricist .mu-lb__labels,
.mu-lb--generator .mu-lb__row,
.mu-lb--generator .mu-lb__labels {
    grid-template-columns: 34px minmax(0, 1fr) 90px 60px 64px;
}

.mu-lb__labels {
    min-height: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--label);
}

.mu-lb__row:hover { background: rgba(232, 234, 237, 0.05); }
.mu-lb__row.is-active .mu-lb__name { color: var(--focus); }

.mu-rank {
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    color: var(--label);
    text-align: center;
}
.mu-rank--top { color: var(--mu-accent); font-weight: 600; }

.mu-lb__play {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--rule);
    border-radius: 50%;
    background: none;
    color: var(--text);
    cursor: pointer;
}
.mu-lb__play:hover { border-color: var(--mu-accent); color: var(--mu-accent); }

.mu-lb__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mu-lb__meta { font-size: 12px; color: var(--blurb); }
.mu-lb__net {
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: var(--text);
}
.mu-lb__rating {
    font-variant-numeric: tabular-nums;
    text-align: right;
    color: #ffc857;
}
.mu-lb__of { font-size: 11px; color: var(--label); }
.mu-lb__rating--none { color: var(--label); }
