/* Scope the recorded editor demo to the home page hero. */
.hero-demo .hero-demo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--hp-border, #dbe3ef);
    border-radius: var(--hp-radius-card, 16px);
    isolation: isolate;
}

body:not(.app-page) .hero-demo img.hero-demo-poster,
.hero-demo .hero-demo-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0;
}

.hero-demo .hero-demo-video {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.hero-demo.has-video .hero-demo-video {
    opacity: 1;
}

.hero-demo .hero-demo-toggle {
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c7d2e4;
    border-radius: 8px;
    background: #fff;
    color: #172b4d;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.hero-demo .hero-demo-toggle:hover {
    background: #eaf1ff;
}

.hero-demo .hero-demo-toggle:focus-visible {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

.hero-demo .hero-demo-toggle svg {
    width: 16px;
    height: 16px;
}

.hero-demo .hero-demo-toggle[hidden],
.hero-demo .hero-demo-pause-icon,
.hero-demo.is-playing .hero-demo-play-icon {
    display: none;
}

.hero-demo.is-playing .hero-demo-pause-icon {
    display: block;
}

.hero-demo .hero-demo-description {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
