﻿.video-component {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 96px 20px;
}

.video-js {
    min-width: 300px;
    min-height: 200px;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

@media (min-width: 1024px) {
    .video-component {
        margin: 96px auto;
    }

    .video-js {
        width: 912px;
        height: auto;
        aspect-ratio: 16/9;
    }
}

@media (min-width: 1512px) {
    .video-component {
        margin: 96px auto;
    }

    .video-js {
        width: 1384px;
        height: auto;
        aspect-ratio: 16/9;
    }
}

/** custom: start play icon make it center rectangle */
.vjs-big-play-button .vjs-svg-icon {
    line-height: 0.5 !important;
    width: 34px;
    height:34px;
}
@media (min-width: 1024px) {
    .vjs-big-play-button .vjs-svg-icon {
        line-height: 0.5 !important;
        width: 64px;
        height: 64px;
    }
}
@media (min-width: 1512px) {
    .vjs-big-play-button .vjs-svg-icon {
        line-height: 0.5 !important;
        width: 64px;
        height: 64px;
    }
}
/** custom end: play icon make it center rectangle */

/** custom: play progress icon,  make it center slider */
.vjs-play-progress .vjs-svg-icon {
    top: -0.3em !important;
}

.video-js .vjs-play-progress {
    background-color: #1A5274 !important;
}
/** custom start: show loading spinning when download video */
.download-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    font-family: Arial, sans-serif;
}

.download-message {
    background-color: #333;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid white;
    width: 40px;
    height: 40px;
    margin: 10px auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
/** custom end: show loading spinning when download video */

/* custom start: Make volume control always visible */
.video-js .vjs-volume-control {
    visibility: visible !important;
    opacity: 1 !important;
    width: 5em !important;
    height: 100% !important;
    display: flex !important;
    transform: none !important;
}

.video-js .vjs-volume-bar {
    visibility: visible !important;
}

.video-js .vjs-volume-panel.vjs-volume-panel-horizontal {
    width: 10em !important;
}
/* custom end: Make volume control always visible */

/** custom: set poster image cover full video */
.vjs-poster img {
    object-fit: cover !important;
}

/** custom: start background of big-play-button */
.video-js .vjs-big-play-button {
    width: 100px;
    height: 60px;
    background-color: #00000026;
    border: unset;
    margin: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
@media (min-width: 1024px) {
    .video-js .vjs-big-play-button {
        width: 200px;
        height: 160px;
    }
}
/** custom: end background of big-play-button */


/** custom: start: make volume circle icon center of volume bar */
.video-js .vjs-volume-control .vjs-volume-level {
    display:flex;
    justify-content:center;
    align-items:center;
}

.video-js .vjs-volume-control .vjs-volume-level .vjs-icon-placeholder.vjs-svg-icon {
    transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.video-component.safari .video-js .vjs-volume-control .vjs-volume-level {
    display: unset;
}
.video-component.safari .video-js .vjs-volume-control .vjs-volume-level .vjs-icon-placeholder.vjs-svg-icon {
    transform: translateY(-50%);
    display: unset;
}
/** custom: end: make volume circle icon center of volume bar */


/** custom: make progress control always visible */
.video-js .vjs-progress-control {
    display: flex !important;
}