/* Video gallery replica: tile styling is shared with gallery_texture.css. */
:root {
    --video-gallery-left: calc(var(--texture-gallery-left) + var(--gallery-width) + var(--panel-spacing));
    --video-gallery-right: calc(100% - var(--video-gallery-left) - var(--gallery-width));
    --video-gallery-top: var(--texture-gallery-top);
    --video-gallery-bottom: var(--texture-gallery-bottom);
}

#videoGallery {
    position: fixed;
    top: var(--video-gallery-top);
    bottom: var(--video-gallery-bottom);
    left: var(--video-gallery-left);
    right: var(--video-gallery-right);
    width: auto;
    height: auto;
    z-index: 2;
    padding: 32px 8px 8px;
    background-color: transparent;
    opacity: var(--texture-gallery-opacity);
    display: flex;
    flex-direction: column;
    gap: var(--texture-gallery-gap);
    border-radius: var(--texture-gallery-radius);
    overflow: hidden;
    transition: background-color 500ms;
}

#videoGallery.gallery-hidden {
    display: none;
}

#videoGallery:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* hover playback covers the thumbnail without intercepting clicks. */
#videoGallery .texture-tile {
    overflow: hidden;
}

#videoGallery .video-hover-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    pointer-events: none;
    visibility: hidden;
    z-index: 0;
}

#videoGallery .texture-label,
#videoGallery .texture-details {
    position: relative;
    z-index: 1;
}

/* right-aligned video information in three rows. */
#videoGallery .texture-details {
    align-self: stretch;
    text-align: right;
    white-space: pre;
}

/* match GL-set drop-target feedback. */
#videoGallery .video-drop-target {
    outline: 2px solid #fff;
    outline-offset: -2px;
}

/* Single-page video gallery uses the same right-aligned headline. */
#videoGalleryLabel {
    position: absolute;
    top: var(--gallery-page-label-top);
    right: 10px;
    display: var(--gallery-page-label-display);
    transform: var(--gallery-page-label-transform);
    color: var(--gallery-page-label-color);
    font-family: var(--gallery-page-label-font-family);
    font-size: var(--gallery-page-label-font-size);
    opacity: var(--gallery-page-label-opacity);
    text-align: right;
}
