/* ==========================================================
   Masons Social Feed — YouTube thumbnail facade
   The post shows the video thumbnail with a play button. The
   player is only created when a visitor clicks (see
   assets/js/youtube-facade.js). Without JavaScript the link
   simply opens the video on YouTube.
   ========================================================== */

.msf-yt-facade {
    margin: 0 0 1.5em;
}

.msf-yt-facade > a {
    display: block;
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    text-decoration: none;
    box-shadow: none;
}

.msf-yt-facade > a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
    transition: transform 0.35s ease;
}

.msf-yt-facade > a:hover img,
.msf-yt-facade > a:focus-visible img {
    transform: scale( 1.04 );
}

/* Play button — circle (::before) with a triangle (::after), no images or SVG */
.msf-yt-facade > a::before,
.msf-yt-facade > a::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
}

.msf-yt-facade > a::before {
    width: 72px;
    height: 72px;
    transform: translate( -50%, -50% );
    border-radius: 50%;
    background: rgba( 0, 0, 0, 0.6 );
    box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.35 );
    -webkit-backdrop-filter: blur( 3px );
    backdrop-filter: blur( 3px );
    transition: transform 0.2s ease, background 0.2s ease;
}

.msf-yt-facade > a::after {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 14px 0 14px 24px;
    border-color: transparent transparent transparent #fff;
    transform: translate( -40%, -50% ); /* optical centring of the triangle */
}

.msf-yt-facade > a:hover::before,
.msf-yt-facade > a:focus-visible::before {
    transform: translate( -50%, -50% ) scale( 1.08 );
    background: rgba( 204, 0, 0, 0.9 );
}

.msf-yt-facade > a:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 3px;
}

/* Player, once the thumbnail has been clicked */
.msf-yt-player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.msf-yt-player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

@media ( max-width: 600px ) {
    .msf-yt-facade > a::before { width: 56px; height: 56px; }
    .msf-yt-facade > a::after  { border-width: 11px 0 11px 19px; }
}
