/* CGC_YOUTUBE_SINGLE_CORNER_PLAY_V2 */

/*
 * The video parent containers already have their own aspect-ratio.
 * The cover fills that exact area.
 */
.cgc-video-box,
.cgc-sunday-video,
.cgc-worship-video,
.youtube-player {
    position: relative;
    overflow: hidden;
}

.cgc-yt-corner-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}

.cgc-yt-corner-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* A subtle dark patch only behind the control, not over faces. */
.cgc-yt-corner-cover::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 95px;
    height: 74px;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,.20) 60%,
        rgba(0,0,0,.34) 100%
    );
    pointer-events: none;
}

.cgc-yt-corner-play {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 4;

    width: 54px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;

    background: #ff0000;
    box-shadow: 0 4px 13px rgba(0,0,0,.32);
    cursor: pointer;
}

.cgc-yt-corner-play::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 10px;

    width: 0;
    height: 0;

    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 14px solid #fff;
}

.cgc-yt-corner-play:hover {
    transform: scale(1.04);
}

.cgc-yt-corner-play:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.cgc-yt-active-frame {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    z-index: 3;
}

@media (max-width: 700px) {
    .cgc-yt-corner-cover::after {
        width: 72px;
        height: 56px;
    }

    .cgc-yt-corner-play {
        right: 7px;
        bottom: 7px;
        width: 42px;
        height: 30px;
        border-radius: 8px;
        box-shadow: 0 3px 9px rgba(0,0,0,.28);
    }

    .cgc-yt-corner-play::before {
        left: 16px;
        top: 8px;
        border-top-width: 7px;
        border-bottom-width: 7px;
        border-left-width: 11px;
    }
}

/* CGC_YOUTUBE_HOVER_MOTION_V1 */
.cgc-yt-corner-cover img,
.cgc-yt-corner-play {
    transition:
        transform .22s ease,
        box-shadow .22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .cgc-yt-corner-cover:hover img {
        transform: scale(1.025);
    }

    .cgc-yt-corner-cover:hover .cgc-yt-corner-play {
        transform: translate(-3px, -3px) scale(1.06);
        box-shadow: 0 7px 18px rgba(0,0,0,.34);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cgc-yt-corner-cover img,
    .cgc-yt-corner-play {
        transition: none;
    }

    .cgc-yt-corner-cover:hover img,
    .cgc-yt-corner-cover:hover .cgc-yt-corner-play {
        transform: none;
    }
}
