/*
* Styles zum video.js v0.1 by Arne Westphal
* Ergänzend zum elearn.js v0.9.8
* eLearning Buero MIN-Fakultaet - Universitaet Hamburg
*/


@font-face {
    font-family: 'eLearn-Video';
    font-style: normal;
    font-weight: normal;
    src: url('../font/eLearn-Video.woff') format('woff');
}

.elearnjs-video {
    max-width:100%;
    margin:3em 0px 3em 0px;
}

/* Apple player hide */

.elearnjs-video *::-webkit-media-controls {
    display: none !important;
    -webkit-appearance: none;
}

.elearnjs-video *::-webkit-media-controls-enclosure {
    display: none !important;
    -webkit-appearance: none;
}

.elearnjs-video *::-webkit-media-controls-panel {
    display: none !important;
    -webkit-appearance: none;
}

/* Old shadow dom for play button */

.elearnjs-video *::--webkit-media-controls-play-button {
    display: none !important;
    -webkit-appearance: none;
}

/* New shadow dom for play button */

.elearnjs-video *::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}


.elearnjs-video {
    position: relative;
    cursor: none;
    line-height: 0;
    outline: none;
    overflow: hidden;
    min-height: 125px;
    min-width: 220px;

    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.elearnjs-video.full {
    position: absolute;
    top:0;
    bottom:0;
    left:0;
    right:0;
    width:100%;
    height:100%;
    margin:0;
    padding: 0;
    background: #000;
}
.elearnjs-video.full video {
    position: fixed;
    right: 0;
    bottom: 0;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -100;
    background: #000;
}

.elearnjs-video > * {
    max-width: 100%;
}

.elearnjs-video.hovered {
    cursor: pointer;
}

.elearnjs-video .controls {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height:100px;
    transition: opacity 0.2s ease-out;

    background: #222222;
    background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.32) 63%, rgba(0,0,0,0.44) 75%, rgba(0,0,0,0.62) 88%, rgba(0,0,0,0.7) 94%, rgba(0,0,0,0.75) 97%, rgba(0,0,0,0.8) 100%);
    background: -webkit-gradient(left top, left bottom, color-stop(0%, rgba(0,0,0,0)), color-stop(25%, rgba(0,0,0,0.05)), color-stop(50%, rgba(0,0,0,0.2)), color-stop(63%, rgba(0,0,0,0.32)), color-stop(75%, rgba(0,0,0,0.44)), color-stop(88%, rgba(0,0,0,0.62)), color-stop(94%, rgba(0,0,0,0.7)), color-stop(97%, rgba(0,0,0,0.75)), color-stop(100%, rgba(0,0,0,0.8)));
    background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.32) 63%, rgba(0,0,0,0.44) 75%, rgba(0,0,0,0.62) 88%, rgba(0,0,0,0.7) 94%, rgba(0,0,0,0.75) 97%, rgba(0,0,0,0.8) 100%);
    background: -o-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.32) 63%, rgba(0,0,0,0.44) 75%, rgba(0,0,0,0.62) 88%, rgba(0,0,0,0.7) 94%, rgba(0,0,0,0.75) 97%, rgba(0,0,0,0.8) 100%);
    background: -ms-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.32) 63%, rgba(0,0,0,0.44) 75%, rgba(0,0,0,0.62) 88%, rgba(0,0,0,0.7) 94%, rgba(0,0,0,0.75) 97%, rgba(0,0,0,0.8) 100%);
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0.32) 63%, rgba(0,0,0,0.44) 75%, rgba(0,0,0,0.62) 88%, rgba(0,0,0,0.7) 94%, rgba(0,0,0,0.75) 97%, rgba(0,0,0,0.8) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#000000', GradientType=0 );
}

.elearnjs-video.hovered .controls {
    pointer-events: auto;
    opacity: 1;
}

.elearnjs-video .controls .bottom-row > * {
    display: flex;
    flex: none;
    height: 24px;
    line-height: 24px;
}

.elearnjs-video .controls .bottom-row {
    display: flex;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px;
    max-width: 100%;
    cursor: default;
}

/* PROGRESSBAR */

.elearnjs-video .controls .video-progress-con {
    display: flex;
    flex-grow: 1;
    position: relative;
    cursor: pointer;
    vertical-align: bottom;
    margin: 5px 5px;
    max-width:100%;
}


.elearnjs-video .controls .video-progress {
    position: absolute;
    top: 10px; /* (24Height - 4Height) / 2 */
    width: 100%;
    height: 4px;
    transition: 0.1s ease-out;
    background: #888;
    background: rgba(200, 200, 200, 0.5);
}

.elearnjs-video .controls .video-progress-con:hover .video-progress {
    height: 6px;
    top: 9px; /* (24Height - 8Height) / 2 */
}


.elearnjs-video .controls .video-progress-con .video-progress-bar,
.elearnjs-video .controls .video-progress-con .video-progress-loaded,
.elearnjs-video .controls .video-progress-con .video-progress-hover {
    position: absolute;
    top:0;
    bottom: 0;
    left: 0;
}

.elearnjs-video .controls .video-progress-con .video-progress-bar
{
    background: #e2001a;
    background: rgba(226, 0, 26, 0.95);
    -webkit-transition: 0.25s linear;
    -moz-transition: 0.25s linear;
    -o-transition: 0.25s linear;
    transition: 0.25s linear;
}

.elearnjs-video .controls .video-progress-pointer {
    position: absolute;
    cursor: pointer;
    pointer-events: none;
    top: 7px;
    left: 0;
    height: 10px;
    width: 10px;
    margin-left: -5px;
    border-radius: 50%;
    background: #e2001a;
    background: rgba(226, 0, 26, 0.95);
    -webkit-transition: 0.25s linear;
    -moz-transition: 0.25s linear;
    -o-transition: 0.25s linear;
    transition: 0.25s linear;
}

.elearnjs-video .controls .video-progress-con .video-progress-loaded {
    background: #b4b4b4;
    background: rgba(200, 200, 200, 0.3);
}

.elearnjs-video .controls .video-progress-con .video-progress-hover {
    background: #888;
    background: rgba(200, 200, 200, 0.2);
}


.elearnjs-video .progress-hover-time {
    position: absolute;
    bottom: 40px;
    font-size: 12px;
    line-height: 12px;
    padding: 3px 5px;
    background: #222222;
    color: white;
    border-radius: 3px;
}


/* TEXT AND ICONS IN CONTROLS */

.elearnjs-video .controls .icon, .elearnjs-video .controls .text {
    margin: 5px;
    color: white;
    line-height: 24px;
    padding: 0 3px;
}

.elearnjs-video .icon {
    font-family: eLearn-video;
    text-align: center;
    color: white;
    font-size: 13pt;
    line-height: 100%;
}

.elearnjs-video .icon:before {
    width: 100%;
    line-height: 24px;
}

.elearnjs-video .icon:hover {
    color: #e2001a;
}

.elearnjs-video .controls .icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    vertical-align: bottom;
}

.elearnjs-video .controls .text {
    cursor: default;
    text-align: center;
}

/* PLAY PAUSE */
.elearnjs-video .controls .icon.playpause.playing:before {
    content: '\e903';
}
.elearnjs-video .controls .icon.playpause.paused:before {
    content: '\e905';
}

/* FULLSCREEN */
.elearnjs-video .controls .icon.fullscreen:before {
    content: '\e902';
}
.elearnjs-video.full .controls .icon.fullscreen:before {
    content: '\e901';
}

/* SOUND */
.elearnjs-video .controls .volume {
    position: relative;
    width: 34px;
    height: 34px;
    cursor: pointer;
    vertical-align: bottom;
    background: transparent;
    background-size: 100% 200%;
    background-image: linear-gradient(to bottom, transparent 50%, #444 50%);
    transition: background-position 0.085s linear;
}

.elearnjs-video .controls .volume .icon.mute:before {
    content: '\e906';
}
.elearnjs-video .controls .volume .icon.low:before {
    content: '\e907';
}
.elearnjs-video .controls .volume .icon.medium:before {
    content: '\e908';
}
.elearnjs-video .controls .volume .icon.high:before {
    content: '\e909';
}


.elearnjs-video .controls .volume.hovered {
    background: #444;
    background-image: linear-gradient(to bottom, transparent 50%, #444 50%);
    transition: background-position 0s linear; /* on way in no transition */
    background-position: 0 100%;
}

.elearnjs-video .controls .volume .volume-con {
    display: none;
    position: absolute;
    box-sizing: border-box;
    bottom: 34px;
    padding: 10px;
    background: #444;
}

.elearnjs-video .controls .volume.hovered .volume-con {
    display: block;
}

.elearnjs-video .controls .volume .volume-con .volume-wrap {
    position: relative;
    width: 14px;
}

.elearnjs-video .controls .volume .volume-con .volume-bar {
    position: absolute;
    left: 5px;
    width: 4px;
    background: #888;
    background: rgba(200, 200, 200, 0.5);
}

.elearnjs-video .controls .volume .volume-con .volume-wrap,
.elearnjs-video .controls .volume .volume-con .volume-bar {
    transition: 0.115s linear;
}

.elearnjs-video .controls .volume .volume-con .volume-wrap,
.elearnjs-video .controls .volume .volume-con .volume-bar {
    height: 0;
}

.elearnjs-video .controls .volume.controlopen .volume-con .volume-wrap,
.elearnjs-video .controls .volume.controlopen .volume-con .volume-bar {
    height: 60px;
}

.elearnjs-video .controls .volume .volume-con .volume-control {
    position: absolute;
    top: 0;
    width: 100%;
    height: 3px;
    margin-top: -1.5px;
    background: #e2001a;
}

/* Error*/

.elearnjs-video .error-con {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index:4;
    background: #444;
    color: white;
    cursor: default;
}

.elearnjs-video .error-con>span {
    position: absolute;
    display: block;
    width: 100%;
    height: 60px;
    top: 50%;
    margin-top: -30px;
    text-align: center;
    line-height: 20px;
}

/* PLAY OVERLAY (before starting) + MOBILE*/

.elearnjs-video .play-overlay,
.elearnjs-video .mobile-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: none;
    background: rgba(0,0,0,0.2);
}

.elearnjs-video .play-overlay + .controls {
    display: none;
}

.elearnjs-video .play-overlay .play,
.elearnjs-video .mobile-overlay .playpause {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    margin-top: -40px;
    margin-left: -40px;
    z-index: 3;
}

.elearnjs-video .mobile-overlay {
    display: none;
}

.elearnjs-video.mobile .mobile-overlay {
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-out;
}

.elearnjs-video.mobile.hovered .mobile-overlay {
    opacity: 1;
    pointer-events: auto;
}

.elearnjs-video.mobile .controls .playpause {
    display: none;
}

.elearnjs-video.mobile .mobile-overlay .icon,
.elearnjs-video .play-overlay .play {
    font-size: 48pt;
    color: white;
    line-height: 80px;
    text-shadow: 0px 0px 15px rgba(0, 0, 0, 1);
}

.elearnjs-video.mobile .mobile-overlay .icon:hover,
.elearnjs-video .play-overlay .play:hover {
    font-size: 50pt;
}

.elearnjs-video .mobile-overlay .icon.playpause.playing:before {
    content: '\e904';
}
.elearnjs-video .mobile-overlay .icon.playpause.paused:before,
.elearnjs-video .play-overlay .play:before {
    content: '\e900';
}

/* ------------------------- VIDEO NOTES ------------------------- */

.noted_video .elearnjs-video {
    margin-bottom: 0;
}

.video_notes {
    display: none;
    background: #888;
    padding: 10px;
    border-radius: 0 0 5px 5px;
    color: white;
    margin-bottom: 3em;
}

.noted_video .video_notes {
    display: block;
}

.noted_video .video_notes span.video_note_timestamp {
    font-weight: bold;
    margin-right: 0.5em;
}

.video_notes .video_note.backup {
    display: none;
}

.elearnjs-video .controls .video-progress-con .video-progress-note {
    position: absolute;
    top:8px; /* centered to .video-progress which is top:10px and height 4px */
    bottom: 0;
    left: 0;
    width: 4px;
    height: 8px;
    background: #F7EF00;
    background: rgba(247, 239, 0, 0.9);
    pointer-events: none;
}



@media screen and (max-width:800px) {
    /* VIDEOS */
    .elearnjs-video .controls {
        padding: 5px;
    }
}
@media screen and (max-width:440px) {
    /* VIDEOS */
    .elearnjs-video .controls {
        padding: 3px;
    }
    .elearnjs-video.mobile .mobile-overlay .icon,
    .elearnjs-video .play-overlay .play {
        font-size: 36pt;
    }
    .elearnjs-video.mobile .mobile-overlay .icon:hover,
    .elearnjs-video .play-overlay .play:hover {
        font-size: 38pt;
    }
}
