.controls {
    position: absolute;
    bottom:24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 50%;
    margin-left: auto;
    margin-right: auto;
    background: #ddd;
    padding: 10px 20px;
    border: #aaaaaa solid 3px;
    border-radius: 25px;
}

.controls .volume-control {
    width: 86%;
    flex: 1 1 0;
}

.controls .button-wrapper {
    width: 10%;
    min-width: 38px;
    display: flex;
    flex: 0 0 auto;
    justify-content: center;
    align-items: flex-end;
    flex-direction: column;
}

.controls #stop-button {
    max-width:100%;
    width:48px;
    height: auto;
}

.controls div#stop-button {
    width: 32px;
    height:32px;
    background-color: rgba(0,0,0,0.6);
    /*border: 2px solid #475f42;*/
    border-radius: 4px;
}

.controls .volume-control label{
    display: block;
    width: 64px;
    min-width: 38px;
}

.controls .volume-control label img {
    width: 64px;
    height: auto;
}

.controls .button-wrapper #stop-button img {
    display: block;
}

.controls.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.controls.visible {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease-in-out;
}

/* Stop button animation */
@keyframes clickFeedback {
    0%   { transform: scale(1); }
    50%  { transform: scale(0.7); }
    100% { transform: scale(1); }
}
  
.feedback {
    animation: clickFeedback 200ms ease;
}

/* Custom volume slider */

.natterjack-slider {
    -webkit-appearance: none;
    appearance: none;
  }

.natterjack-slider {
    --value: 1;
    -webkit-appearance: none;
    appearance: none;
    background: none;
    width: 100%;
    height: 12px;
    background:
      linear-gradient(
        to right,
        #475f42 0%,
        #475f42 calc(var(--value) * 100%),
        #cdb283 calc(var(--value) * 100%),
        #cdb283 100%
      );
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    margin: 0.5em 0;
}

/* Draw track */
.natterjack-slider::-webkit-slider-runnable-track {
    height: 12px; /* match intended track height */
    border-radius: 6px;
    background:
        linear-gradient(
            to right,
            #475f42 0%,
            #475f42 calc(var(--value) * 100%),
            #cdb283 calc(var(--value) * 100%),
            #cdb283 100%
        );
}

.natterjack-slider:focus {
    outline: none;
  }
  
/* WebKit thumb */
.natterjack-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    border: none;               /* remove any default border */
    background-color: transparent; /* remove any default fill */
    background: url('img/graphics/natterjack-illustration-192px.png') no-repeat center;
    background-size: contain;
    margin-top: -18px;
    box-shadow: none;
    -webkit-box-shadow: none;
    cursor: pointer;
}
  
/* Firefox thumb */
.natterjack-slider::-moz-range-thumb {
    width: 48px;
    height: 48px;
    background: url('img/graphics/natterjack-illustration-192px.png') no-repeat center;
    background-size: contain;
    border: none;
    box-shadow: none;
    cursor: pointer;
}
  
/* IE / Edge */
.natterjack-slider::-ms-thumb {
    width: 48px;
    height: 48px;
    background: url('img/graphics/natterjack-illustration-192px.png') no-repeat center;
    background-size: contain;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 860px) {
    .controls {
        width: 60%;
        bottom: 48px;
    }
    .controls .volume-control label {
        width: 48px;
    }
}

@media (max-width: 480px) {
    .controls {
        width: 90%;
        bottom: 48px;
    }
    .controls .volume-control label {
        width: 38px;
    }
}