﻿/*子庭 2021/10/5 改預覽圖片不直接載入youtube-CSS*/
.youtube-container {
    display: block;
    margin: 20px auto;
    width: 100%;
    max-width: 600px;
}

.youtube-player {
    display: block;
    width: 100%; /* assuming that the video has a 16:9 ratio */
    padding-bottom: 56.25%;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: block;
}

img.youtube-thumb {
    bottom: 0;
    display: block;
    left: 0;
    margin: auto !important;
    max-width: 100% !important;
    width: 100%;
    position: absolute;
    right: 0;
    top: 0;
    height: auto
}

#youtube-iframe {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/*youtube按鈕*/
.play-button {
    height: 49px;
    width: 62px;
    left: 50%;
    top: 54%;
    margin-left: -36px;
    margin-top: -36px;
    background: #251e1e;
    border-radius: 50% / 10%;
    color: #FFFFFF;
    font-size: 1em; /*大小*/
    padding: 0;
    position: absolute;
    text-align: center;
    text-indent: 0.1em;
    transition: all 150ms ease-out;
    opacity: 0.9; /*透明度*/
}
    /*按鈕hover*/
    .play-button:hover {
        background: red;
        opacity: 1;
    }
    /*矩形*/
    .play-button::before {
        background: inherit;
        border-radius: 5% / 50%;
        bottom: 9%;
        content: "";
        left: -5%;
        position: absolute;
        right: -5%;
        top: 9%;
    }
    /*三角形*/
    .play-button::after {
        border-style: solid;
        border-width: 1em 0 1em 1.732em;
        border-color: transparent transparent transparent rgba(255, 255, 255, 0.75);
        content: ' ';
        font-size: 0.75em;
        height: 0;
        margin: -1em 0 0 -0.75em;
        top: 50%;
        position: absolute;
        width: 0;
    }

.play-title {
    max-height: 10%;
    width: 100%;
    bottom: 0;
    background: #251e1e;
    color: #FFFFFF;
    font-size: 2em;
    padding: 0;
    position: absolute;
    text-align: center;
    text-indent: 0.1em;
    transition: all 150ms ease-out;
    opacity: 0.9;
}
/*按鈕hover*/
.youtube-player:hover .play-title {
    max-height: 32%;
}

._ElementVideoWindow .play-title {
    max-height: 10%;
    width: 100%;
    bottom: 0;
    background: #251e1e;
    color: #FFFFFF;
    font-size: 1em;
    padding: 0;
    position: absolute;
    text-align: center;
    text-indent: 0.1em;
    transition: all 150ms ease-out;
    opacity: 0.9;
}

.youtube-player:hover .play-title {
    max-height: 32%;
}
