/* The music bot's panel (MusicPlayerPanel.razor): inside a RipCord voice room and on the Music player page. */

.mb { display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.mb__gone { margin: 0; color: var(--rl-text-muted); font-size: .9rem; }

/* Now playing: a picture, then what it is. */
.mb__now { display: flex; gap: .85rem; align-items: center; min-width: 0; }
.mb__art { flex: 0 0 auto; width: 4.5rem; height: 4.5rem; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--rl-surface-sunken); font-size: 1.8rem; border: 1px solid var(--rl-border); }
.mb__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb__meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1; }
.mb__title { font-weight: 650; font-size: 1.05rem; color: var(--rl-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mb__title:hover { text-decoration: underline; }
.mb__title--idle { color: var(--rl-text-muted); font-weight: 600; }
.mb__artist { display: flex; flex-wrap: wrap; gap: .1rem .6rem; font-size: .85rem; color: var(--rl-text-muted); }
.mb__artist > span + span::before { content: "· "; }
.mb__status { min-height: 1.1em; font-size: .8rem; color: var(--rl-accent); }

/* Seek bar: the fill is a gradient driven by --mb-fill, which music-player.js keeps current. */
.mb__seek { display: flex; align-items: center; gap: .6rem; }
.mb__time { flex: 0 0 auto; min-width: 2.6rem; font-size: .78rem; font-variant-numeric: tabular-nums; color: var(--rl-text-muted); }
.mb__time:last-child { text-align: right; }
.mb__bar { flex: 1; min-width: 0; height: 1.2rem; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --mb-fill: 0%; }
.mb__bar:disabled { cursor: default; opacity: .55; }
.mb__bar::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--rl-accent) var(--mb-fill), var(--rl-surface-sunken) var(--mb-fill)); }
.mb__bar::-moz-range-track { height: 6px; border-radius: 3px; background: var(--rl-surface-sunken); }
.mb__bar::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--rl-accent); }
.mb__bar::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4px; border-radius: 50%; background: var(--rl-accent); border: 2px solid var(--rl-surface); box-shadow: 0 0 0 1px var(--rl-border); }
.mb__bar::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--rl-accent); border: 2px solid var(--rl-surface); }

.mb__tap { align-self: flex-start; }

/* Controls. */
.mb__ctl { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.mb__btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.2rem; height: 2.2rem; padding: 0 .55rem; border: 1px solid var(--rl-border); border-radius: 8px; background: var(--rl-surface-raised); color: var(--rl-text); cursor: pointer; font-size: 1rem; line-height: 1; }
.mb__btn:hover:not(:disabled) { background: var(--rl-surface-raised); }
.mb__btn:disabled { opacity: .45; cursor: default; }
.mb__btn--main { min-width: 2.8rem; height: 2.5rem; border-radius: 50%; background: var(--rl-accent); color: var(--rl-accent-contrast); border-color: transparent; font-size: 1.1rem; }
.mb__btn--main:hover:not(:disabled) { background: color-mix(in srgb, var(--rl-accent) 88%, var(--rl-text)); }
.mb__btn--on { color: var(--rl-accent); border-color: color-mix(in srgb, var(--rl-accent) 55%, transparent); background: color-mix(in srgb, var(--rl-accent) 12%, var(--rl-surface)); }
.mb__btn--text { font-size: .82rem; color: var(--rl-text-muted); }
.mb__vol { display: inline-flex; align-items: center; gap: .35rem; margin-left: .4rem; }
.mb__vol input { width: 6.5rem; accent-color: var(--rl-accent); }

/* Adding. */
.mb__add { display: flex; gap: .5rem; }
.mb__add input { flex: 1; min-width: 0; min-height: var(--rl-control-h); padding: .5rem .75rem; border-radius: 8px; border: 1px solid var(--rl-border); background: var(--rl-surface-raised); color: var(--rl-text); font: inherit; }
.mb__add input:focus-visible { outline: none; border-color: var(--rl-accent); box-shadow: var(--rl-ring); }
.mb__add input:focus-visible { outline: 2px solid var(--rl-accent); outline-offset: 1px; }
.mb__msg { margin: 0; padding: .4rem .65rem; border-radius: 8px; font-size: .85rem; background: var(--rl-surface-sunken); color: var(--rl-text); display: flex; justify-content: space-between; gap: .5rem; }
.mb__msg--error { background: color-mix(in srgb, var(--rl-danger) 12%, var(--rl-surface)); color: var(--rl-danger); }

/* The queue. */
.mb__queueHead { margin: .3rem 0 0; font-size: .95rem; }
.mb__fold { align-self: flex-start; border: 0; background: transparent; color: var(--rl-text-muted); cursor: pointer; font-size: .85rem; padding: .1rem 0; }
.mb__fold:hover { color: var(--rl-text); }
.mb__queue { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 22rem; overflow-y: auto; border: 1px solid var(--rl-border); border-radius: 10px; }
.mb--compact .mb__queue { max-height: 14rem; }
.mb__row { display: grid; grid-template-columns: 1.6rem 2.2rem minmax(0, 1fr) auto auto auto; align-items: center; gap: .5rem; padding: .3rem .5rem; font-size: .85rem; }
.mb__row:hover { background: var(--rl-surface-raised); }
.mb__row--now { background: color-mix(in srgb, var(--rl-accent) 10%, var(--rl-surface)); }
.mb__row--done { opacity: .55; }
.mb__row--failed .mb__rowTitle { text-decoration: line-through; }
.mb__n { text-align: center; color: var(--rl-text-muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.mb__row--now .mb__n { color: var(--rl-accent); }
.mb__thumb { width: 2.2rem; height: 2.2rem; border-radius: 6px; overflow: hidden; background: var(--rl-surface-sunken); }
.mb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb__what { display: flex; flex-direction: column; min-width: 0; }
.mb__rowTitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb__rowSub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .76rem; color: var(--rl-text-muted); }
.mb__fail { color: var(--rl-danger); }
.mb__len { font-size: .78rem; color: var(--rl-text-muted); font-variant-numeric: tabular-nums; }
.mb__rowBtn { width: 1.7rem; height: 1.7rem; border: 0; border-radius: 8px; background: transparent; color: var(--rl-text-muted); cursor: pointer; opacity: 0; }
.mb__row:hover .mb__rowBtn, .mb__rowBtn:focus-visible { opacity: 1; }
.mb__rowBtn:hover { background: var(--rl-surface-sunken); color: var(--rl-text); }

/* Compact: in a voice room, under the tiles. */
.mb--compact .mb__art { width: 3.2rem; height: 3.2rem; font-size: 1.4rem; }
.mb--compact .mb__title { font-size: .95rem; }
.vs__music { display: flex; flex-direction: column; gap: .5rem; padding: .6rem .75rem .7rem; border-top: 1px solid var(--rl-border); background: var(--rl-surface); max-height: 46vh; overflow-y: auto; }
.vs__musicHead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; font-size: .88rem; }
.vs__musicHead .btn { padding: .25rem .65rem; font-size: .85rem; }

/* The page: the player beside how it works, under the banner (MusicPlayerPage.razor and its scoped sheet). */
.mbpage { width: 100%; max-width: 76rem; min-width: 0; box-sizing: border-box; margin: 0 auto; }
.mbpage__card { padding: 1.1rem 1.2rem; }
.mbpage__about ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; font-size: .9rem; color: var(--rl-text-muted); }
.mbpage__about strong { color: var(--rl-text); }

@media (max-width: 640px) {
    .mb__vol input { width: 4.5rem; }
    .mb__row { grid-template-columns: 1.4rem 2rem minmax(0, 1fr) auto auto; }
    .mb__len { display: none; }
    .mb__rowBtn { opacity: 1; }
}
