/**
 * The following styles get applied both on the front of your site
 * and in the editor.
 *
 * Replace them with your own styles or remove the file completely.
 */

 .hds-audio-player__playpause {
    width: 3rem;
    height: 3rem;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hds-audio-player__playpause:hover {
    cursor: pointer;
}

.hds-audio-player__playpause svg {
    width: 1.1rem;
    height: 1.1rem;
}

.hds-audio-player-inner {
    display: grid;
    grid-template-columns: max-content max-content 1fr;
    gap: 1.5rem;
    align-items: center;
}

.hds-audio-player-wrap.hds-audio-player--has-image {
    grid-template-columns: max-content 1fr;
    display: grid;
    align-items: center;
    gap: 0rem;
}

.hds-audio-image {
    min-width: 6.5rem;
    height: auto;
    position: relative;
}

.hds-audio-image:before {
    content: "";
    display: block;
    padding-top: 100%;
}

.hds-audio-image > figure {
    margin: 0;
}

/*** Time Scrubber ***/
.hds-audio-player__scrubber-time {
    display: grid;
    grid-template-columns: 1fr max-content;
    gap: 1.5rem;
    align-items: center;
}

/*** Mute ***/
button.hds-audio-player__mute {
    background-color: transparent;
    border: 0;
}

button.hds-audio-player__mute:hover {
    cursor: pointer;
}

.hds-audio-player__mute svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: #fff;
    border-radius: 50%;
}

/*** Volume Control ***/
.hds-audio-controls {
    position: relative;
    padding: 10px 10px;
}

.hds-audio-controls {

    /* We need to add focus and hover rules on the mute directly in order to open the slider for A11y */
    .hds-audio-player__mute {
        &:hover + .hds-audio-player__volume-wrapper,
        &:focus + .hds-audio-player__volume-wrapper {
            opacity: 1;
            z-index: 999;
        }
        
        &:hover {
            .hds-audio-player__volume-wrapper {
                opacity: 1;
                z-index: 999;
            }
        }

        &:focus {
            .hds-audio-player__volume-wrapper {
                opacity: 1;
                z-index: 999;
            }
        }
    }

    /* We need to also add focus and hover rules for the outer div so that the mouse doesn't have to be exactly on the mute button to open the slider */
    &:hover {
        .hds-audio-player__volume-wrapper {
            opacity: 1;
            z-index: 999;
        }
    }

    &:focus {
        .hds-audio-player__volume-wrapper {
            opacity: 1;
            z-index: 999;
        }
    }
    
}


.hds-audio-player__volume-wrapper {
    background: #3c3c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8rem;
    height: 2rem;   
    padding: 0.75rem;
    border-radius: 2rem;
    box-shadow: 3px 3px 25px rgba(0,0,0,0.75);
    position: absolute;
    opacity: 0;
    z-index: -999;
}

@media screen and (max-width: 800px) {
    .hds-audio-player__scrubber-time {
        grid-template-columns: 1fr;
        gap: 0rem;
    }

    .hds-audio-player__playpause {
        width: 2.25rem;
        height: 2.25rem;
    }

    .hds-audio-player__playpause svg {
        width: 0.9rem;
        height: 0.9rem;
    }

    .hds-audio-player-inner {
        gap: 0.5rem;
    }

    .hds-audio-image {
        min-width: 4.5rem;
    }

    .hds-audio-player-wrap .hds-audio-controls {
        display: none;
    }

    .hds-audio-player-wrap .hds-audio-time {
        margin-bottom: -1rem;
        font-size: 0.8rem;
    }

    .hds-audio-player-wrap .hds-audio-player-inner {
        grid-template-columns: max-content 1fr;
        gap: 1.5rem;
    }
}

/*** Hide the default player ***/
.hds-audio-player-wrap .hds-audio-player__file, .hds-audio-player__file {
    display: none!important;
}

/*** Style the range ***/
input[type=range].hds-audio-player__scrubber {
    -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
    -moz-appearance: none;
    appearance: none;
    width: 100%; /* Specific width is required for Firefox. */
    background: transparent; /* Otherwise white in Chrome */
}

input[type=range].hds-audio-player__scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type=range].hds-audio-player__scrubber::-ms-track {
    width: 100%;
    cursor: pointer;
    /* Hides the slider so custom styles can be added */
    background: transparent;
    border-color: transparent;
    color: transparent;
}

input[type=range].hds-audio-player__scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: calc(-0.5rem + 1px); /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}

input[type=range].hds-audio-player__scrubber::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #8b8b8d;
}

input[type=range].hds-audio-player__scrubber::-moz-range-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #8b8b8d;
}

input[type=range].hds-audio-player__scrubber::-ms-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #8b8b8d;
}

input[type=range].hds-audio-player__scrubber::-ms-fill-lower {
    background: #8b8b8d;
}

input[type=range].hds-audio-player__scrubber::-ms-fill-upper {
    background: #8b8b8d;
}

input[type=range].hds-audio-player__scrubber:focus::-webkit-slider-runnable-track {
    background: #8b8b8d;
}

input[type=range].hds-audio-player__scrubber::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}

input[type=range].hds-audio-player__scrubber::-ms-thumb {
    -ms-appearance: none;
    appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}


/*** Volume ***/

/*** Style the range ***/
input[type=range].hds-audio-player__volume {
    -webkit-appearance: none; /* Hides the slider so that custom slider can be made */
    -moz-appearance: none;
    appearance: none;
    width: 100%; /* Specific width is required for Firefox. */
    background: transparent; /* Otherwise white in Chrome */
}

input[type=range].hds-audio-player__volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

input[type=range].hds-audio-player__volume::-ms-track {
    width: 100%;
    cursor: pointer;
    /* Hides the slider so custom styles can be added */
    background: transparent;
    border-color: transparent;
    color: transparent;
}

input[type=range].hds-audio-player__volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    margin-top: calc(-0.5rem + 1px); /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}

input[type=range].hds-audio-player__volume::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #8b8b8d;
}

input[type=range].hds-audio-player__volume::-moz-range-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #8b8b8d;
}

input[type=range].hds-audio-player__volume::-ms-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #8b8b8d;
}

input[type=range].hds-audio-player__volume::-ms-fill-lower {
    background: #8b8b8d;
}

input[type=range].hds-audio-player__volume::-ms-fill-upper {
    background: #8b8b8d;
}

input[type=range].hds-audio-player__volume:focus::-webkit-slider-runnable-track {
    background: #8b8b8d;
}

input[type=range].hds-audio-player__volume::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}

input[type=range].hds-audio-player__volume::-ms-thumb {
    -ms-appearance: none;
    appearance: none;
    height: 1rem;
    width: 1rem;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; /* Add cool effects to your sliders! */
}

.hds-audio-player__volume-wrapper input, .hds-audio-player__scrubber-time input{
    height: 25px;
    cursor: pointer;
}

/* //Fix BRs and Ps that render in the player */
.hds-audio-player-wrap br, .hds-audio-player-wrap p:not(.hds-audio-time) {
    display: none;
}

/* //Turn off the focus state on the play pause button */
.hds-audio-player-wrap button.hds-audio-player__playpause:focus {
    outline: 0.25rem solid #fff;
}

p.hds-audio-time {
    margin-bottom: 0px;
}

.hds-audio-player-wrap .playPauseIcon{
    margin-right: -5px!important;
}
