@import '../abstracts/variables';

@import '~bootstrap/scss/utilities/embed';

.video {
    margin: {
        top: map-get($spacers, 6);
        bottom: map-get($spacers, 6);
    }

    .title {
        color: $secondary;
        text-align: center;
        margin-bottom: map-get($spacers, 6);
    }

    &-container {
        width: 75%;
        padding-top: 56.5%;
        background-color: $gray-500;

        margin: {
            left: auto;
            right: auto;
        }
    }
}

.video-player {
    @extend .embed-responsive;
    @extend .embed-responsive-16by9;

    clear: both;
    margin: 2rem 0;
    position: relative;
    background-size: cover;
    background-position: center;

    &.loading {
        .play {
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);

            width: 70px;
            height: 50px;
            border-radius: 9px;
            position: absolute;
            background-color: rgba(0, 0, 0, 0.5);

            &::after {
                left: 50%;
                top: 50%;
                width: 0;
                height: 0;
                content: ' ';
                display: block;
                position: absolute;
                border-style: solid;
                transform: translate(-50%, -50%);
                border-width: 10px 0 10px 22px;
                border-color: transparent transparent transparent rgba(255, 255, 255, 1);
            }
        }

        &:hover {
            cursor: pointer;

            .play {
                background-color: rgba(red, 0.9);
            }
        }
    }
}