/*
 * FapSwipe Image Stage 0.1.0
 *
 * Version one intentionally does one job: render the selected representative
 * image with deterministic contain-fit geometry inside the vertical swipe stage.
 * Gallery navigation and image zoom/pan will be added only after real-site media
 * discovery is proven.
 */

.fapswipe-image-stage {
    position: relative;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    width: calc(100% - 24px);
    height: min(72dvh, 760px);
    margin-inline: auto;
    overflow: hidden;
    background: #000;
    line-height: 0;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.fapswipe-image-stage .fapswipe-image-media {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    pointer-events: none;
}

@media (orientation: landscape) and (max-height: 600px) {
    .fapswipe-image-stage[data-fapswipe-surface="feed"] {
        width: calc(
            100% - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 8px
        );
        height: calc(
            100dvh
            - env(safe-area-inset-top, 0px)
            - env(safe-area-inset-bottom, 0px)
            - 8px
        );
        max-height: none;
    }
}
