.audioplayer
{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: #333;
    user-select: none;
    color: #fff;
    font-size: 14px;
}

.audioplayer > *:not(audio)
{
    box-sizing: border-box;
    padding: 17px;
    height: 100%;
}

.audioplayer > .audioplayer-playpause
{
    position: relative;
    text-indent: -999em;
    flex: 0;
    min-width: 48px;
    cursor: pointer;
}

.audioplayer > .audioplayer-playpause:before
{
    float: left;
    padding-top: 100%;
    content: '';
}

.audioplayer > .audioplayer-playpause:hover,
.audioplayer > .audioplayer-playpause:focus
{
    background-color: #222;
}

.audioplayer > .audioplayer-playpause span
{
    display: inline-block;
}

/* "play" icon when audio is not being played */
.audioplayer:not(.audioplayer-playing) > .audioplayer-playpause span
{
    width: 0;
    height: 0;
    border: 0.5em solid transparent; /* 8 */
    border-right: none;
    border-left-color: #fff;
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -0.5em 0 0 -0.25em; /* 8 4 */
}

/* "pause" icon when audio is being played */
.audioplayer.audioplayer-playing .audioplayer-playpause span
{
    width: 0.75em; /* 12 */
    height: 0.75em; /* 12 */
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -0.375em 0 0 -0.375em; /* 6 */
}

.audioplayer.audioplayer-playing .audioplayer-playpause span:before,
.audioplayer.audioplayer-playing .audioplayer-playpause span:after
{
    width: 40%;
    height: 100%;
    background-color: #fff;
    content: '';
    position: absolute;
    top: 0;
}

.audioplayer.audioplayer-playing .audioplayer-playpause span:before
{
    left: 0;
}

.audioplayer.audioplayer-playing .audioplayer-playpause span:after
{
    right: 0;
}

.audioplayer > .audioplayer-time
{
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center
}

.audioplayer > .audioplayer-time-current
{
    border-left: 1px solid #111;
}

.audioplayer > .audioplayer-bar {
    flex: 1;
    background-color: #222;
    cursor: pointer;
    position: relative;
    padding: 0;
    height: 1rem;
}

.audioplayer > .audioplayer-bar div
{
    position: absolute;
    width: 0;
    height: 100%;
    left: 0;
    top: 0;
}

.audioplayer > .audioplayer-bar .audioplayer-bar-loaded
{
    background-color: #555;
    z-index: 1;
}

.audioplayer > .audioplayer-bar .audioplayer-bar-played
{
    background: #007fd1;
    z-index: 2;
}

.audioplayer > .audioplayer-volume
{
    position: relative;
    text-indent: -999em;
    flex: 0;
    min-width: 48px;
    cursor: pointer;
    border-left: 1px solid #111;
}

.audioplayer > .audioplayer-volume:before
{
    float: left;
    padding-top: 100%;
    content: '';
}

.audioplayer > .audioplayer-volume:hover,
.audioplayer > .audioplayer-volume:focus
{
    background-color: #222;
}

.audioplayer .audioplayer-volume-button
{
    width: 100%;
    height: 100%;
    position: relative;
    text-align: left;
}

.audioplayer:not(.audioplayer-muted) .audioplayer-volume-button:before
{
    content: '';
    position: absolute;
    top: calc(50% - 3.5px);
    transform: translateY(-50%);
    left: .6em;
    width: 7px;
    height: 7px;
    border: 4px double currentcolor;
    border-width: 4px 4px 0 0;
    border-radius: 0 15px 0 0;
    transform: rotate(45deg);
}

.audioplayer .audioplayer-volume-button span:before,
.audioplayer .audioplayer-volume-button span:after
{
    content: '';
    position: absolute;
}

.audioplayer .audioplayer-volume-button span:before
{
    left: -50%;
    border: 7px solid transparent;
    border-right-color: currentcolor;
    background: transparent;
    top: 50%;
    transform: translateY(-50%);
}

.audioplayer .audioplayer-volume-button span:after
{
    top: 50%;
    left: 0;
    width: 4px;
    height: 6px;
    background: currentcolor;
    transform: translateY(-50%);
}

/* volume adjuster */
.audioplayer .audioplayer-volume-adjust
{
    width: 100%;
    height: 100px;
    cursor: default;
    position: absolute;
    left: 0;
    background: #222;
    opacity: 0;
    transition: opacity .01s ease-in;
    bottom: 100%;
    /* transition: translateY(-100%); */
}

.audioplayer .audioplayer-volume:hover .audioplayer-volume-adjust
{
    opacity: 1;
}

.audioplayer .audioplayer-volume-adjust > div
{
    width: 1em;
    height: calc(100% - 1em);
    background-color: #555;
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin: 30% auto 0;
}

.audioplayer .audioplayer-volume-adjust div div
{
    width: 100%;
    height: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: #007fd1;
}

.audioplayer.audioplayer-novolume .audioplayer-volume
{
    display: none;
}

.audioplayer > .audioplayer-volume {
    display: none;
}