/* RUYA_DOCUMENT_VIEWER_MOUNT_FINAL_V6B_20261018 */

html body .ruyaDocumentViewerOverlay{
    position:fixed !important;
    inset:0 !important;

    width:100vw !important;
    max-width:100vw !important;

    height:100vh !important;
    height:100dvh !important;

    min-width:0 !important;

    margin:0 !important;
    padding:0 !important;

    display:grid !important;

    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:auto minmax(0,1fr) !important;

    overflow:hidden !important;

    box-sizing:border-box !important;

    z-index:2147483500 !important;

    background:#202735 !important;
}

html body.ruyaDocumentViewerOpen{
    overflow:hidden !important;
    overscroll-behavior:none !important;
}


/* HEADER */

html body .ruyaDocumentViewerBar{
    position:relative !important;
    z-index:5 !important;

    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;

    gap:8px !important;

    box-sizing:border-box !important;

    padding:
        calc(9px + env(safe-area-inset-top))
        10px
        9px !important;

    background:#13264f !important;

    border-bottom:
        1px solid rgba(255,255,255,.12) !important;
}

html body .ruyaDocumentViewerBar > strong{
    flex:1 1 auto !important;

    min-width:0 !important;

    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;

    color:#fff !important;

    font-size:12px !important;
    font-weight:650 !important;
}

html body .ruyaDocumentViewerBar > div{
    flex:0 0 auto !important;

    display:flex !important;
    align-items:center !important;

    gap:6px !important;
}

html body .ruyaDocumentViewerBar button{
    min-height:35px !important;

    padding:0 9px !important;

    border:
        1px solid rgba(255,255,255,.14) !important;

    border-radius:9px !important;

    background:#17307a !important;
    color:#fff !important;

    font-size:11px !important;
    font-weight:700 !important;

    white-space:nowrap !important;
}


/* STAGE */

html body .ruyaDocumentViewerStage{
    position:relative !important;

    display:block !important;

    width:100% !important;
    max-width:100% !important;

    height:100% !important;

    min-width:0 !important;
    min-height:0 !important;

    margin:0 !important;

    box-sizing:border-box !important;

    overflow:auto !important;

    -webkit-overflow-scrolling:touch !important;

    overscroll-behavior:contain !important;

    padding-bottom:
        env(safe-area-inset-bottom) !important;

    background:#202735 !important;
}


/* IMAGE */

html body .ruyaDocumentViewerImageSurface{
    position:relative !important;

    min-width:0 !important;

    margin:
        8px
        auto
        24px !important;

    box-sizing:border-box !important;
}

html body .ruyaDocumentViewerImage{
    display:block !important;

    height:auto !important;

    margin:
        0
        auto !important;

    user-select:none !important;
    -webkit-user-select:none !important;

    -webkit-touch-callout:none !important;

    background:#fff !important;
}


/* PDF */

html body .ruyaPdfJsSurface{
    position:relative !important;

    min-width:0 !important;

    margin:
        0
        auto
        24px !important;

    box-sizing:border-box !important;
}

html body .ruyaPdfJsPage{
    display:block !important;

    height:auto !important;

    margin:
        0
        auto
        10px !important;

    background:#fff !important;

    box-shadow:
        0 5px 20px
        rgba(0,0,0,.22) !important;
}

html body .ruyaPdfJsLoading{
    padding:24px !important;

    color:#fff !important;

    text-align:center !important;
}


/* PDF FALLBACK */

html body .ruyaDocumentViewerStage iframe{
    display:block !important;

    width:100% !important;
    max-width:100% !important;

    height:100% !important;

    min-width:0 !important;

    margin:0 !important;

    border:0 !important;

    background:#fff !important;
}


/* PINCH */

html body .ruyaDocumentViewerImageStage,
html body .ruyaPdfJsStage{
    touch-action:pan-x pan-y !important;
}


/* VIDEO */

html body .ruyaDocumentViewerStage video{
    display:block !important;

    width:auto !important;
    max-width:100% !important;

    height:auto !important;
    max-height:100% !important;

    margin:auto !important;

    background:#000 !important;
}


@media(max-width:600px){

    html body .ruyaDocumentViewerBar{
        gap:6px !important;

        padding-left:8px !important;
        padding-right:8px !important;
    }

    html body .ruyaDocumentViewerBar > strong{
        font-size:11px !important;
    }

    html body .ruyaDocumentViewerBar button{
        min-height:34px !important;

        padding:0 8px !important;

        font-size:10.5px !important;
    }
}
