/**
 * CSS for: YouTube lazyload
 * I think this is used only in these blog posts:
 *  https://flammeum.com/british-wedding-in-istria/
 *  https://flammeum.com/britansko-vjencanje-u-istri/
 */

.youtube-player {
    position: relative;
    padding-bottom: 56.23%;     /* VERTICAL VIDEO: remove this */
    /* Use 75% for 4:3 videos */
    height: 0;                  /* VERTICAL VIDEO: remove this */
    overflow: hidden;
    max-width: 100%;            /* VERTICAL VIDEO: remove this */
    background: #000;

    /* VERTICAL VIDEO: set exact dimensions
    width:320px;
    height:570px;
    */
}

.youtube-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: transparent;
}

.youtube-player img {
    bottom: 0;
    display: block;
    left: 0;
    margin: auto;
    max-width: 100%;
    width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    border: none;
    height: auto;               /* VERTICAL VIDEO: remove this */
    cursor: pointer;
    -webkit-transition: .4s all;
    -moz-transition: .4s all;
    transition: .4s all;
    
    /* VERTICAL VIDEO: make the thumbnail cover whole video player
    object-fit:cover;
    object-position:center;
    width:100%;
    height:100%;
    */
}

.youtube-player img:hover {
    -webkit-filter: brightness(75%);
}

.youtube-player .play {
    height: 72px;
    width: 72px;
    left: 50%;
    top: 50%;
    margin-left: -36px;
    margin-top: -36px;
    position: absolute;
    /* background: url("//i.imgur.com/TxzC70f.png") no-repeat;  // this image doesn't exist anymore */
    cursor: pointer;
    border-radius: 999px;
    background-color: #0008;
}
.youtube-player .play::before {
    /* triangle with pure CSS: https://css-tricks.com/making-pure-css-playpause-button/ */
    content: "";
    border: 0;
    background: transparent;
    display: block;
    box-sizing: border-box;
    width: 0;
    height: 40px;
    border-color: transparent transparent transparent #fff;
    border-style: solid;
    border-width: 20px 0 20px 35px;
    position: relative;
    top: 16px;
    left: 23px;
}

/* VERTICAL VIDEO: responsive - don't scale video player with the site 
@media only screen and (max-width:800px){
    .youtube-player{
        width:100% !important;
        min-width:320px !important; }
} */