/**
 * Tutorial Video Component (includes/components/tutorial-video.php)
 * Poster link that tutorial-video.js swaps for a YouTube player (a div.tutorial-video
 * holding the iframe). Borders, not shadows; tokens only.
 */
.tutorial-video-section {
    padding-top: var(--space-16);
}

.tutorial-video-heading {
    max-width: 28ch;
    margin: 0 auto var(--space-2);
    text-align: center;
}

.tutorial-video-intro {
    margin: 0 auto var(--space-6);
    text-align: center;
    color: var(--text-secondary);
}

.tutorial-video {
    display: block;
    position: relative;
    max-width: 880px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid var(--ink-100);
    border-radius: var(--radius-lg);
    background: var(--ink-900);
}

/* The global focus halo also sets a small radius; keep the video's corners */
.tutorial-video:focus-visible {
    border-radius: var(--radius-lg);
}

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

.tutorial-video img {
    object-fit: cover;
}

.tutorial-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    /* White on the brand-purple posters, so it reads at a glance */
    background: var(--ink-0);
    color: var(--purple-600);
    font-size: 32px;
    transform: translate(-50%, -50%);
    transition: background-color 0.15s ease-out, color 0.15s ease-out;
}

.tutorial-video-play svg.icon {
    margin-left: 4px; /* optically centre the triangle */
    fill: currentColor;
}

.tutorial-video:hover .tutorial-video-play,
.tutorial-video:focus-visible .tutorial-video-play {
    background: var(--purple-700);
    color: var(--ink-0);
}

.tutorial-video-label {
    position: absolute;
    left: var(--space-4);
    bottom: var(--space-4);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 32px;
    padding: 0 var(--space-3);
    border-radius: var(--radius-full);
    background: var(--ink-900);
    color: var(--ink-0);
    font: var(--text-label);
}

@media (max-width: 767.98px) {
    .tutorial-video-section {
        padding-top: var(--space-12);
    }

    .tutorial-video-play {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .tutorial-video-label {
        left: var(--space-3);
        bottom: var(--space-3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .tutorial-video-play {
        transition: none;
    }
}
