* {
    box-sizing: border-box;
}

#videoRecorder {
    --spacer: 1rem;
    position: relative;
    background: black;
    border-radius: calc(var(--spacer) / 1.5);
    overflow: hidden;
    font-size: calc(var(--spacer) * 1);
    /* width: 50%; */
    /* height: auto; */
}

#videoRecorder * {
    /* outline: 1px solid hsl(0deg 100% 50% / 75%); */
}

#videoRecorder video {
    width: 100%;
    height: auto;
}

#videoRecorder button {
    height: calc(var(--spacer) * 2);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    background: white;
    color: black;
    border: none;
    border-radius: calc(var(--spacer) / 1);
    padding: calc(var(--spacer) / 2) calc(var(--spacer) / 1.5);
    overflow: hidden;
}

#videoRecorder button:focus {
    outline: 2px solid blue;
    outline-offset: 2px;
}

#videoRecorder button:disabled {
    /* color: gray !important; */
    cursor: not-allowed;
    opacity: 0.5;
    -webkit-user-select: none;
    user-select: none;
}

#video__display {
    display: block;
}

#video__controls {
    position: absolute;
    width: calc(100% - (var(--spacer) * 2));
    /* height: calc(var(--spacer) * 3); */
    bottom: var(--spacer);
    left: var(--spacer);
    padding: calc(var(--spacer) / 2);
    border-radius: calc(var(--spacer) / 2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    background: hsla(0, 0%, 0%, 0.25);
    color: white;
    font-family: sans-serif;
    overflow: hidden;
}

#video__controls>* {
    margin: calc(var(--spacer) / 2);
}

#video__controls>button {
    width: calc(var(--spacer) * 2);
    background: none;
    color: white;
    border-radius: calc(var(--spacer) / 4);
    padding: 0;
}

#video__record,
#video__play,
#video__reset,
#video__download,
#video__append {
    font-size: calc(var(--spacer) * 2);
}

#video__record,
#video__play {
    line-height: var(--spacer);
}

/* #video__reset {
    align-items: flex-start !important;
    line-height: 0.8em;
} */

/* #video__timerDuration {
    color: gray;
} */

#video__timeline {
    height: calc(var(--spacer) / 4);
    width: 100%;
    background: gray;
    position: relative;
    border-radius: calc(var(--spacer) / 8);
    overflow: hidden;
}

#video__timelineProgress {
    height: 100%;
    width: 0%;
    background: white;
    transition: width 0.25s linear;
}

#video__overlay {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: hsla(0, 0%, 0%, 0.5);
    color: white;
    text-align: center;
}

#video__overlay button {
    margin: calc(var(--spacer) / 2);
}

#video__overlay>div {
    padding: var(--spacer);
}

#video__overlay>div>div {
    display: flex;
    justify-content: center;
    margin-bottom: calc(var(--spacer) / 2);
}

#video__live {
    position: absolute;
    top: var(--spacer);
    left: var(--spacer);
    /* background: red; */
    color: red;
    font-size: calc(var(--spacer) * 2);
    line-height: 1em;
    padding: 0 calc(var(--spacer) / 4);
    /* border-radius: calc(var(--spacer) / 2); */
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.hidden {
    display: none !important;
}

#videoRecorder .colorRed {
    color: red !important;
}

@media (max-width: 28rem) {
    #videoRecorder {
        --spacer: 0.875rem;
    }

    #video__controls {
        padding: calc(var(--spacer) / 4);
    }

    #video__controls>* {
        margin: calc(var(--spacer) / 4);
    }
}

@media (max-width: 19rem) {
    #video__timerDuration {
        display: none;
    }
}

@media (max-width: 16rem) {
    #video__timeline {
        display: none;
    }
}