.video-preview-container {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
}

.video-preview-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: black;
}

.video-preview__duration {
    display: flex;
    align-items: center;
    gap: 4px;

    position: absolute;
    right: 10px;
    bottom: 10px;

    padding: 3px 6px;

    border-radius: 6px;

    background: var(--video-preview-duration-bg);
    color: var(--video-preview-duration-color);

    font-size: 12px;
    font-weight: 500;
    line-height: 1;

    pointer-events: none;

    user-select: none;
}

.video-preview__controls {
    display: flex;
    flex-direction: column;
    z-index: 2;
    gap: 5px;

    position: absolute;
    top: 10px;
    right: 10px;

    width: 36px;

    padding: 0;

    align-items: center;
    justify-content: center;
}

.video-preview__toggle {
    display: flex;

    position: relative;

    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: var(--video-preview-control-bg);
    color: var(--video-preview-control-color);

    cursor: pointer;
    user-select: none;
    pointer-events: auto;

    background: transparent;
}

.video-preview__toggle::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: 50%;
    background: var(--video-preview-control-bg);

    animation: video-preview-toggle-fade 2s ease 3s forwards;
}

@keyframes video-preview-toggle-fade {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

.video-preview__toggle-icon {
    display: flex;

    position: absolute;
    inset: 0;

    align-items: center;
    justify-content: center;

    opacity: 1;
    transform: scale(1);

    transition:
        opacity 0.35s ease-in-out,
        transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.video-preview__toggle-icon svg {
    position: relative;
    z-index: 1;

    width: 24px;
    height: auto;

    transform: translateY(1px);
    transform-origin: center center;

    stroke-width: 2;

    transition: transform 0.25s ease;
}

.video-preview__toggle-play-pause svg {
    width: 20px;
}

@media (hover: hover) and (pointer: fine) {
    .video-preview__toggle:hover::before {
        animation: none;
        opacity: 1;
    }

    .video-preview__toggle-icon:hover svg {
        transform: translateY(1px) scale(1.1);
    }
}

body.media-player .video-preview__toggle-sound {
    display: none;
}

.video-preview-container:not(.is-sound-off) .toggle-icon--sound-off,
.video-preview-container.is-sound-off .toggle-icon--sound-on{
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.video-preview-container:not(.is-playing) .toggle-icon--pause,
.video-preview-container.is-playing .toggle-icon--play {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

.video-preview__watch-progress {
    position: absolute;
    z-index: 1;
    left: 0;
    right: 0;
    bottom: 0;

    height: 4px;
    background: var(--video-preview-watch-progress-bg);
}

.video-preview__watch-progress-buffer {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 1;

    width: var(--video-preview-watch-buffer);

    background: var(--video-preview-watch-progress-buffer-bg);
}

.video-preview__watch-progress-value {
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 2;

    width: var(--video-preview-watch-progress);
    height: 100%;

    background: var(--video-preview-watch-progress-value-bg);

    transition: width 0.1s linear;
}
