.m-youtube-video {
    padding: clamp(3rem, 7vw, 6rem) 0;
}

.m-youtube-video__headline {
    margin-bottom: 1.5rem;
}

.m-youtube-video__text p:last-child {
    margin-bottom: 0;
}

.m-youtube-video__player-wrap {
    overflow: hidden;
    border-radius: var(--vt-radius-lg);
    background: transparent;
    box-shadow: var(--vt-box-shadow-normal);
}

.m-youtube-video__player {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* Facade / großer Player */

.m-youtube-video__facade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.m-youtube-video__facade-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.m-youtube-video__facade:hover .m-youtube-video__facade-img,
.m-youtube-video__facade:focus-visible .m-youtube-video__facade-img {
    transform: scale(1.02);
}

.m-youtube-video__facade-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 76px;
    height: 76px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    transform: translate(-50%, -50%);
    box-shadow: var(--vt-box-shadow-light);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease;
}

.m-youtube-video__facade-play::after {
    content: "";
    position: absolute;
    left: 53%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 22px solid var(--vt-color-primary);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
}

.m-youtube-video__facade:hover .m-youtube-video__facade-play,
.m-youtube-video__facade:focus-visible .m-youtube-video__facade-play {
    transform: translate(-50%, -50%) scale(1.06);
}


/* Thumbnail Grid */

.m-youtube-video__thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border: 3px solid transparent;
    border-radius: var(--vt-radius-lg);
    overflow: hidden;
    background: transparent;
    cursor: pointer;
    box-shadow: var(--vt-box-shadow-light);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.m-youtube-video__thumb:hover,
.m-youtube-video__thumb:focus-visible {
    box-shadow: var(--vt-box-shadow);
}

.m-youtube-video__thumb:focus-visible {
    outline: 3px solid rgba(198, 62, 13, 0.25);
    outline-offset: 3px;
}

.m-youtube-video__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.m-youtube-video__thumb:hover .m-youtube-video__thumb-img,
.m-youtube-video__thumb:focus-visible .m-youtube-video__thumb-img {
    transform: scale(1.04);
}

.m-youtube-video__thumb-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    /*background: rgba(0, 59, 120, 0.16);*/
    transition: background-color 0.2s ease;
}

.m-youtube-video__thumb:hover .m-youtube-video__thumb-overlay,
.m-youtube-video__thumb:focus-visible .m-youtube-video__thumb-overlay {
    background: rgba(0, 59, 120, 0.04);
}


/* Play-Icon auf Thumbnail */

.m-youtube-video__thumb::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    transform: translate(-50%, -50%);
    box-shadow: var(--vt-box-shadow-light);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        opacity 0.2s ease;
}

.m-youtube-video__thumb::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-left: 16px solid var(--vt-color-primary);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.m-youtube-video__thumb:hover::before,
.m-youtube-video__thumb:focus-visible::before {
    transform: translate(-50%, -50%) scale(1.06);
}

.m-youtube-video__thumb:hover::after,
.m-youtube-video__thumb:focus-visible::after {
    transform: translate(-40%, -50%) scale(1.06);
}


/* Aktiver Zustand */

.m-youtube-video__thumb.is-active {
    border-color: var(--vt-color-accent);
    box-shadow: var(--vt-box-shadow);
}

.m-youtube-video__thumb.is-active .m-youtube-video__thumb-overlay {
    background: rgba(0, 59, 120, 0.1);
}

.m-youtube-video__thumb.is-active::before,
.m-youtube-video__thumb.is-active::after {
    opacity: 0;
}

.m-youtube-video__thumb.is-active .m-youtube-video__status {
    opacity: 1;
    transform: translateY(0);
}


/* Badge bitte im PHP ergänzen:
   <span class="m-youtube-video__status" aria-hidden="true">Wird abgespielt</span>
*/

.m-youtube-video__status {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 1.5rem);
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: var(--vt-color-accent);
    color: var(--vt-color-white);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: var(--vt-box-shadow-light);
    opacity: 0;
    transform: translateY(0.35rem);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

@media (max-width: 767.98px) {
    .m-youtube-video__facade-play {
        width: 60px;
        height: 60px;
    }

    .m-youtube-video__facade-play::after {
        border-left-width: 18px;
        border-top-width: 11px;
        border-bottom-width: 11px;
    }

    .m-youtube-video__thumb::before {
        width: 46px;
        height: 46px;
    }

    .m-youtube-video__thumb::after {
        border-left-width: 13px;
        border-top-width: 8px;
        border-bottom-width: 8px;
    }
}