/* ═══════════════════════════════════════════════════════════════
   music-player.css — Global floating music player

   Sized entirely in `em` off the one font-size on #music-player, so the
   resize handle can scale the whole control by writing a single value.
═══════════════════════════════════════════════════════════════ */

#music-player {
    position: fixed;
    top: 88px;
    right: 18px;
    z-index: 1200;
    /* The scaling anchor. Everything below is relative to it. */
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45em;
    padding: 0.35em 0.45em;
    border-radius: 999px;
    background: rgba(8, 8, 20, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 99, 255, 0.22);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
    cursor: grab;
}

.mp-circle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-1);
    /* 0.78em of a 16px root = 12.48px, and 2.4em of that = 30px — the size
       this control has always been. */
    font-size: 0.78em;
    width: 2.4em;
    height: 2.4em;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mp-circle:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 212, 255, 0.45);
    background: rgba(0, 212, 255, 0.12);
}

.mp-circle-main {
    width: 2.72em;
    height: 2.72em;
    background: linear-gradient(135deg, var(--accent), #7c74ff);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(108, 99, 255, 0.35);
}

.mp-circle:disabled { opacity: 0.4; cursor: not-allowed; }
#mp-status, #mp-library { font-size: 0.75em; white-space: nowrap; }
#mp-status { color: var(--text-2); }
#mp-library { color: var(--accent-2); }
#music-player[data-empty="true"] #mp-volume,
#music-player[data-empty="true"] #mp-mute { display: none; }

/* ── volume ─────────────────────────────────────────────────────── */
/* The mute button is a normal .mp-circle; .mp-vol only marks the two
   controls that the floating-panel drag must ignore. */
.mp-vol {
    flex: none;
}

#mp-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 4.6em;
    height: 1.8em;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

#mp-volume::-webkit-slider-runnable-track {
    height: 0.3em;
    border-radius: 999px;
    background: linear-gradient(to right,
        var(--accent) 0, var(--accent) var(--mp-fill, 70%),
        rgba(255, 255, 255, 0.16) var(--mp-fill, 70%));
}

#mp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 0.95em;
    height: 0.95em;
    margin-top: -0.325em;   /* (0.3em track − 0.95em thumb) / 2 */
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--accent);
}

#mp-volume::-moz-range-track {
    height: 0.3em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
}

#mp-volume::-moz-range-progress {
    height: 0.3em;
    border-radius: 999px;
    background: var(--accent);
}

#mp-volume::-moz-range-thumb {
    width: 0.95em;
    height: 0.95em;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px var(--accent);
}

@media (max-width: 768px) {
    #music-player {
        top: 78px;
        right: 10px;
        /* One knob instead of restating every dimension. */
        font-size: 0.92rem;
    }
}
