/* ==================================
   JINX.FM — FLOATING PLAYER
================================== */

.music-player {
    position: fixed;
    right: 18px;
    bottom: 65px;

    width: 310px;
    max-width: calc(100vw - 24px);

    z-index: 990;

    color: var(--cream, #fff0dc);
    background: var(--berry, #292237);

    border: 1px solid var(--line, #201d2c);
    border-radius: 8px;
    box-shadow: 5px 5px 0 #0005;

    font-family: var(--system-font, "Space Mono", monospace);
    font-size: 11px;
}

.music-player * {
    box-sizing: border-box;
}

.music-player [hidden] {
    display: none !important;
}


/* TITLE BAR */

.music-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 7px 10px;

    color: white;
    background: var(--dark-blue, #2458ad);

    border-bottom: 1px solid var(--line, #201d2c);
    border-radius: 7px 7px 0 0;

    font-size: 11px;
    font-weight: bold;

    cursor: grab;
    touch-action: none;
    user-select: none;
}

.music-titlebar:active {
    cursor: grabbing;
}

#music-minimize {
    display: grid;
    place-items: center;

    width: 23px;
    height: 23px;
    padding: 0;

    color: var(--ink, #292237);
    background: var(--lavender, #b592e6);

    border: 1px solid var(--line, #201d2c);
    border-radius: 4px;

    font: inherit;
    cursor: pointer;
}


/* PLAYER BODY */

.music-body {
    padding: 11px;
}

.music-display {
    padding: 11px;

    background: var(--blackberry, #201d2c);

    border: 1px solid var(--lavender, #b592e6);
    border-radius: 5px;
}

.music-system-label {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;
    margin-bottom: 10px;

    color: var(--pink, #ed51a5);

    font-size: 9px;
    letter-spacing: 1px;
}

#music-status {
    color: var(--lavender, #b592e6);
    font-size: 8px;
}

.music-player.is-playing #music-status {
    color: var(--green, #bde879);
}

.track-title {
    color: var(--cream, #fff0dc);
    font-size: 13px;
    font-weight: bold;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.track-artist {
    margin-top: 4px;

    color: var(--lavender, #b592e6);
    font-size: 10px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* VISUALIZER */

#music-visualizer {
    display: block;

    width: 100%;
    height: 40px;

    margin: 11px 0 8px;

    border-bottom: 1px solid var(--plum, #41304f);
}


/* RANGE SLIDERS */

.music-range {
    display: block;

    width: 100%;
    min-width: 0;
    height: 6px;
    margin: 8px 0;

    appearance: none;
    -webkit-appearance: none;

    background: linear-gradient(
        to right,
        var(--pink, #ed51a5) var(--range-progress, 0%),
        var(--plum, #41304f) var(--range-progress, 0%)
    );

    border-radius: 10px;
    outline: none;
    cursor: pointer;
}

.music-range::-webkit-slider-thumb {
    width: 11px;
    height: 11px;

    appearance: none;
    -webkit-appearance: none;

    background: var(--lavender, #b592e6);
    border: 1px solid var(--line, #201d2c);
    border-radius: 50%;
}

.music-range::-moz-range-thumb {
    width: 11px;
    height: 11px;

    background: var(--lavender, #b592e6);
    border: 1px solid var(--line, #201d2c);
    border-radius: 50%;
}

.music-time {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    color: var(--lavender, #b592e6);
    font-size: 9px;
}


/* PLAYBACK CONTROLS */

.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;
    margin: 12px 0;
}

.music-controls button,
#music-mute {
    display: grid;
    place-items: center;

    width: 36px;
    height: 30px;

    padding: 0;

    color: var(--cream, #fff0dc);
    background: var(--plum, #41304f);

    border: 1px solid var(--lavender, #b592e6);
    border-radius: 4px;

    font: inherit;
    font-weight: bold;
    cursor: pointer;
}

.music-controls button:hover,
#music-mute:hover {
    background: var(--dark-blue, #2458ad);
}

.music-controls button[aria-pressed="true"] {
    color: var(--ink, #292237);
    background: var(--lavender, #b592e6);
}

.music-controls .music-main-button {
    width: 48px;
    height: 38px;

    color: var(--ink, #292237);
    background: var(--pink, #ed51a5);

    border-color: var(--line, #201d2c);
    box-shadow: 2px 2px 0 var(--line, #201d2c);

    font-size: 17px;
}

.music-controls .music-main-button:hover {
    background: var(--lavender, #b592e6);
}


/* VOLUME */

.music-volume {
    display: flex;
    align-items: center;

    gap: 9px;
    margin-bottom: 12px;
}

#music-mute {
    flex: 0 0 28px;

    width: 28px;
    height: 24px;
}

#volume-value {
    min-width: 32px;

    text-align: right;
    color: var(--lavender, #b592e6);
    font-size: 10px;
}


/* PLAYLIST */

.playlist-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
    padding: 9px;

    color: var(--cream, #fff0dc);
    background: var(--plum, #41304f);

    border: 1px solid var(--lavender, #b592e6);
    border-radius: 4px;

    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.playlist-toggle:hover {
    background: var(--dark-blue, #2458ad);
}

#playlist-count {
    font-size: 9px;
}

.music-playlist {
    max-height: 135px;
    margin-top: 7px;

    overflow-y: auto;

    background: var(--blackberry, #201d2c);
    border: 1px solid var(--lavender, #b592e6);
    border-radius: 4px;
}

.playlist-track {
    display: flex;
    align-items: center;
    gap: 7px;

    width: 100%;
    padding: 9px;

    color: var(--cream, #fff0dc);
    background: transparent;

    border: 0;
    border-bottom: 1px solid var(--plum, #41304f);

    text-align: left;
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.playlist-track:last-child {
    border-bottom: 0;
}

.playlist-track:hover {
    background: var(--plum, #41304f);
}

.playlist-track.active {
    color: var(--pink, #ed51a5);
    background: var(--berry, #292237);
}

.playlist-track.active::before {
    content: "▶";
    font-size: 8px;
}

.playlist-track-name {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* MINIMIZED */

.music-player.is-minimized .music-titlebar {
    border-bottom: 0;
    border-radius: 7px;
}


/* ACCESSIBILITY */

.music-player button:focus-visible,
.music-player input:focus-visible {
    outline: 2px dashed var(--pink, #ed51a5);
    outline-offset: 3px;
}

.music-player button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* MOBILE */

@media (max-width: 500px) {

    .music-player {
        width: 280px;
        right: 12px;
    }

}

/* ==================================
   JINX.FM — COLOR REFINEMENT
================================== */

.music-player {
    background: var(--lavender);
    color: var(--ink);
    border: 2px solid var(--line);
    box-shadow: 5px 5px 0 #0006;
}

.music-display {
    background: var(--blackberry);
    border: 1px solid var(--line);
}

.music-controls button,
#music-mute {
    background: var(--cream);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: 2px 2px 0 var(--line);
}

.music-controls .music-main-button {
    background: var(--pink);
    color: var(--ink);
}

.music-controls button:hover,
#music-mute:hover {
    background: var(--pink);
    color: var(--ink);
}

.music-controls button[aria-pressed="true"] {
    background: var(--dark-blue);
    color: white;
}

#volume-value {
    color: var(--ink);
}

.playlist-toggle {
    background: var(--cream);
    color: var(--ink);
    border: 1px solid var(--line);
}

.playlist-toggle:hover {
    background: var(--pink);
}