.video-player {
    margin: 2em 0;
    position: relative;
}

.video-player-video {
    width: 100%;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

/* Tablet (> 640px) */
@media screen and (min-width: 40rem) {
    .video-player {
        margin: 2em;
    }
}

/* Video player Controls */
.video-player-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    transition: 300ms ease-in-out;
}

.video-player.fullscreen .video-player-controls {
    color: white;
    padding: 0 0.5rem;
}

/* Progress */
.video-player .progress {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 0.15rem;
    translate: 0 1px;
}

.video-player .progress-bar {
    flex-grow: 1;
    margin: 0 0.15rem 0 0;
    translate: 0 -1px;
}

.video-player .progress-bar::after {
    width: var(--progress, 0);
}

.video-player input[type="range"] {
    -webkit-appearance: none;
    background: transparent;
    cursor: pointer;
    accent-color: white;
    z-index: 1;
    position: relative;
}

.video-player input[type="range"]::after,
.video-player input[type="range"]::before {
    content: " ";
    height: 3px;
    background-color: rgba(0, 0, 0, 0.25);
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    left: 0;
    right: 0;
    z-index: -2;
}

.video-player input[type="range"]::after {
    background-color: black;
}

.video-player input[type="range"]::-webkit-slider-runnable-track,
.video-player input[type="range"]::-moz-range-track {
    background: transparent;
    height: 1rem;
    width: 100%;
}

.video-player input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: 0;
    height: 14px;
    width: 3px;
    z-index: 10;
    background-color: black;
}

.video-player input[type="range"]::-moz-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: 0;
    height: 14px;
    width: 3px;
    z-index: 10;
    background-color: black;
}

.video-player button {
    align-self: center;
}

/* Sound */
.video-player .sound-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.video-player .sound-button-volume {
    display: none;
}

.video-player .sound-button:hover .sound-button-volume {
    display: block;
    width: 3rem;
    height: fit-content;
}

.video-player .sound-button-volume::after {
    width: var(--volume, 100%) !important;
}

/* Icons & Labels  */
.video-player .label > * {
    display: none;
}

.video-player .label > *.active {
    display: block;
}

/* Fullscreen */
.video-player.fullscreen .video-player-video {
    border-radius: 0;
    height: calc(100% - 2rem);
    object-fit: contain;
}

.video-player.fullscreen .video-player-controls input[type="range"]::before {
    background-color: gray;
}

.video-player.fullscreen .video-player-controls input[type="range"]::after {
    background-color: white;
}

.video-player.fullscreen input[type="range"]::-webkit-slider-thumb {
    background-color: white;
}

.video-player.fullscreen input[type="range"]::-moz-slider-thumb {
    background-color: white;
}