.root {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.expanded {
    min-height: 320px;
    max-height: min(68vh, 640px);
}

.media {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.expanded .media {
    max-height: min(68vh, 640px);
}

.sourceVideo {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.error {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-weight: 650;
}

.playbackControl {
    position: absolute;
    right: var(--space-3);
    bottom: var(--space-3);
    display: inline-flex;
    height: 34px;
    align-items: center;
    gap: var(--space-1);
    padding: 0 var(--space-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text-primary);
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    transition:
        border-color var(--motion-fast) var(--ease-standard),
        color var(--motion-fast) var(--ease-standard),
        transform var(--motion-fast) var(--ease-standard);
}

.playbackControl:hover,
.playbackControl:focus-visible {
    border-color: var(--primary);
    color: var(--primary);
}

.playbackControl:active {
    transform: scale(0.97);
}

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