/* Click-to-load YouTube player (video.js). Colours come from the theme's Bootstrap variables, so it follows light
   and dark mode; the play button is YouTube-neutral (dark disc, white triangle) so it reads on the poster. */
.mssp-video {
    margin: 1.5rem 0;
}

.mssp-video-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    overflow: hidden;
    background: #1b2a3a;
}

/* The theme underlines links with a bottom border; the poster link is a block, not text. */
a.mssp-video-frame,
a.mssp-video-frame:hover {
    border-bottom: 1px solid var(--bs-border-color);
}

.mssp-video-frame img,
.mssp-video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Sized with the poster (13% of its width, at most 4.5rem), so on a phone it stays in the gap between the
   poster's "Why reset?" and its target number. */
.mssp-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(4.5rem, 13%);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
    transition: transform 0.15s ease, background 0.15s ease;
}

.mssp-video-play::after {
    content: "";
    position: absolute;
    inset: 29% 25% 29% 37%;
    background: #fff;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.mssp-video-frame:hover .mssp-video-play,
.mssp-video-frame:focus-visible .mssp-video-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(0, 0, 0, 0.88);
}

.mssp-video-frame:focus-visible {
    outline: 3px solid var(--bs-focus-ring-color, var(--bs-primary));
    outline-offset: 3px;
}

.mssp-video figcaption {
    margin-top: 0.5rem;
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}
