/* =========================================================
   SHADOWNET // HEADER MUSIC PLAYER
   ========================================================= */

.sn-music-player {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;

    width: 430px;
    max-width: 100%;

    font-family: "Courier New", Courier, monospace;

    color: var(--sn-accent);
}


/* =========================================================
   TRACK INFORMATION
   ========================================================= */

.sn-player-info {
    display: flex;
    flex-direction: column;
    justify-content: center;

    width: 105px;
    min-width: 105px;

    line-height: 1.1;
}

.sn-player-label {
    margin-bottom: 4px;

    color: var(--sn-accent-dim);

    font-size: 7px;
    font-weight: 700;

    letter-spacing: 2px;
    text-transform: uppercase;
}

.sn-player-track-name {
    overflow: hidden;

    color: var(--sn-accent-bright);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.5px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   SHUFFLE
   ========================================================= */

.sn-player-shuffle {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 25px;
    height: 25px;

    margin: 0;
    padding: 0;

    border:
        1px solid var(--sn-accent-18);

    outline: 0;

    background: transparent;

    color: var(--sn-accent-dim);

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size: 13px;
    line-height: 1;

    cursor: pointer;

    transition:
        color .15s ease,
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.sn-player-shuffle:hover,
.sn-player-shuffle:focus-visible {

    border-color:
        var(--sn-accent-soft);

    color:
        var(--sn-accent-bright);
}

.sn-player-shuffle.is-active {

    border-color:
        var(--sn-accent);

    background:
        var(--sn-accent-07);

    color:
        var(--sn-accent-bright);

    box-shadow:
        0 0 10px
        var(--sn-accent-12);
}


/* =========================================================
   CONTROLS
   ========================================================= */

.sn-player-controls {
    display: flex;
    align-items: center;

    gap: 4px;

    flex: 0 0 auto;
}

.sn-player-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 25px;
    height: 25px;

    margin: 0;
    padding: 0;

    border:
        1px solid var(--sn-accent-25);

    outline: 0;

    background:
        var(--sn-accent-03);

    box-shadow: none;

    color:
        var(--sn-accent-dim);

    font-family:
        "Courier New",
        Courier,
        monospace;

    font-size: 7px;
    line-height: 1;

    cursor: pointer;

    transition:
        color .15s ease,
        border-color .15s ease,
        background .15s ease,
        box-shadow .15s ease;
}

.sn-player-button:hover,
.sn-player-button:focus-visible {

    border-color:
        var(--sn-accent);

    background:
        var(--sn-accent-07);

    color:
        var(--sn-accent-bright);

    box-shadow:
        0 0 10px
        var(--sn-accent-10);
}

.sn-player-button:active {
    transform:
        translateY(1px);
}


/* PLAY / PAUSE */

.sn-player-play {
    width: 29px;
    height: 29px;

    border-color:
        var(--sn-accent-soft);

    color:
        var(--sn-accent-bright);

    font-size: 8px;
}


/* =========================================================
   PROGRESS / MONITOR
   ========================================================= */

.sn-player-monitor {
    display: flex;
    align-items: center;

    width: 145px;
    min-width: 100px;
}

.sn-player-progress {
    position: relative;

    width: 100%;
    height: 20px;

    overflow: hidden;

    border:
        1px solid var(--sn-accent-18);

    background:
        linear-gradient(
            90deg,
            var(--sn-accent-03),
            transparent
        );

    cursor: pointer;
}

.sn-player-progress:focus-visible {
    outline:
        1px solid var(--sn-accent);

    outline-offset: 2px;
}


/* =========================================================
   PROGRESS FILL
   ========================================================= */

.sn-player-progress-fill {
    position: absolute;

    z-index: 1;

    top: 0;
    bottom: 0;
    left: 0;

    width: 0%;

    background:
        linear-gradient(
            90deg,
            var(--sn-accent-05),
            var(--sn-accent-18)
        );

    border-right:
        1px solid var(--sn-accent);

    pointer-events: none;
}


/* =========================================================
   VISUALIZER
   ========================================================= */

.sn-player-visualizer {
    position: absolute;

    z-index: 2;

    inset: 3px 4px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 2px;

    pointer-events: none;
}

.sn-player-visualizer i {
    display: block;

    flex: 1 1 0;

    min-width: 1px;
    height: 18%;

    background:
        var(--sn-accent-dim);

    opacity: .55;

    transition:
        height .08s linear,
        background .2s ease,
        box-shadow .2s ease,
        opacity .2s ease;
}


/* =========================================================
   PLAYING STATE
   ========================================================= */

.sn-music-player.is-playing
.sn-player-visualizer i {

    background:
        var(--sn-accent);

    opacity: .9;

    box-shadow:
        0 0 4px
        var(--sn-accent-12);
}

.sn-music-player.is-playing
.sn-player-label {

    color:
        var(--sn-accent-mid);
}

.sn-music-player.is-playing
.sn-player-play {

    border-color:
        var(--sn-accent);

    background:
        var(--sn-accent-07);

    color:
        var(--sn-accent-bright);

    box-shadow:
        0 0 12px
        var(--sn-accent-12);
}


/* =========================================================
   AUDIO ELEMENT
   ========================================================= */

#sn-player-audio {
    display: none;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .sn-music-player {
        width: 360px;
        gap: 8px;
    }

    .sn-player-info {
        width: 90px;
        min-width: 90px;
    }

    .sn-player-monitor {
        width: 110px;
    }

}


@media (max-width: 800px) {

    .sn-player-monitor {
        display: none;
    }

    .sn-music-player {
        width: auto;
    }

}