/* GGurgenidze — full-photo viewer + silent feed refresh */

.photo-viewer {
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
}

.photo-viewer .photo-viewer-stage {
    position: fixed !important;
    inset:
        max(10px, env(safe-area-inset-top))
        max(10px, env(safe-area-inset-right))
        max(10px, env(safe-area-inset-bottom))
        max(10px, env(safe-area-inset-left)) !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.photo-viewer .photo-viewer-stage > img,
.photo-viewer img.js-photo-viewer-image {
    position: static !important;
    display: block !important;
    flex: 0 1 auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    image-orientation: from-image;
    transform: none !important;
    clip-path: none !important;
}

@media (min-width: 901px) {
    .post-media-grid.post-media-count-1 {
        display: grid !important;
        place-items: center !important;
        max-height: 620px !important;
        overflow: hidden !important;
        background: #101720 !important;
    }

    .post-media-grid.post-media-count-1 > .post-media-item {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-height: 620px !important;
        background: #101720 !important;
    }

    .post-media-grid.post-media-count-1 > .post-media-item > img {
        display: block !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: 100% !important;
        max-height: 620px !important;
        object-fit: contain !important;
        object-position: center center !important;
        margin: auto !important;
        transform: none !important;
    }
}

#live-feed-posts.is-silent-feed-sync,
#live-feed-posts.is-silent-feed-sync * {
    animation-duration: 0s !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
}

@media (max-width: 700px) {
    .photo-viewer .photo-viewer-stage {
        inset:
            max(6px, env(safe-area-inset-top))
            max(4px, env(safe-area-inset-right))
            max(6px, env(safe-area-inset-bottom))
            max(4px, env(safe-area-inset-left)) !important;
    }
}
