/*   = = =   Document Viewer : Nox Cella's file viewer, for the portfolio's CV   = = =   */

/* - - - THE OWNER'S WORD (2026-10-23) : the PDF viewer of Nox Cella "with their behind content (multiple pages) as
   well as the colour backdrop blur effect which occurs in the background when opened, fade in and fade out animation,
   all", ported "1:1", "the only difference being the colours". DocumentViewer-Script.js builds the elements and runs
   Nox's engines ; this sheet is Nox Cella's rules for them, each scoped to the viewer (#file-context-modal), in the
   portfolio's tokens (the same names as Nox's : --primary-color, --text-main, --text-muted, --accent-rgb), from :

       ModalShell-Styling.css                        the overlay, the frame, the header and the body
       SubmissionForm-RevealConceal-StylingComponent  how it arrives and leaves : the veil and the frame's fade
       SubmissionForm-ModalShell-StylingComponent     the title, and the lightbox's undressed header
       Viewer-Styling.css                             the lightbox : the media's room, the working mark, the
                                                      picture's bounds, the pile, the page's number, BACK
       MediaBackdrop-Styling.css                      the page itself, blurred, dimmed and enlarged behind it
       ImageEditor-Styling.css                        the working mark's breath (noxEditorBusy)

   EVERY FIGURE IS NOX CELLA'S AS ITS CONFIG SHIPS IT, written once below on the overlay as Nox's settings would
   write them : the fades (ui.modal, 220 in, 160 out), the motion (ui.modalFrames.motion : a fade, no scale), the
   viewer's veil (its Modal Frame : 30% dim under a 12px blur), its media's ceiling (72% of the screen's height
   landscape, 64% upright, under the caps), the title (ui.viewer.title), the page's number (ui.viewer.counter), BACK
   (ui.viewer.back and the viewerBack button family, a 4px unit) and the short screen's figure (ui.screenFit,
   --nk-vfit, written by the script).

   NOT `.modal-overlay` : that is the owner's tools' class (EffectsEditor-Styling.css styles every one), so this
   overlay is `.nk-viewer` and every rule names #file-context-modal. At 1400, the owner's windows' layer ; over the
   header's 900. The island goes while it is open (THE ISLAND STEPS ASIDE, below). - - - */



/*   = = = = = =   The Overlay   = = = = = =   */

#file-context-modal
{
    /* - - - The figures, Nox Cella's, as its settings would write them - - - */
    --nk-fade-in: 220ms;
    --nk-fade-out: 160ms;
    --nk-md-reveal-o: 0;
    --nk-md-reveal-s: 1;
    --nk-md-conceal-o: 0;
    --nk-md-conceal-s: 1;
    --nk-mdim: 0.30;
    --nk-mblur: 12px;
    --nk-mw: 100vw;
    --nk-mh: 72dvh;
    --nk-modal-cap-w: 87.5vw;
    --nk-modal-cap-h: 90dvh;
    --nk-vc-size: 10px;
    --nk-vc-spacing: 2px;
    --nk-vc-margin: calc((0.33333dvmin + 0.1875dvmax) * var(--nk-vfit, 1));
    --nk-vb-font: 11px;
    --nk-vb-spacing: 3px;
    --nk-btn-unit: 4px;

    /* - - - BACK's line-height, declared ONCE because two rules need it : BACK itself, and the room below that
       derives BACK's height. 1.33 is Segoe UI's `normal`, written as a number so the height is arithmetic. - - - */
    --nk-vb-line: 1.33;

    /* - - - BACK's height : its padding top and bottom (the viewerBack family, 2.5 units each) and its line. - - - */
    --nk-vb-height: calc(var(--nk-btn-unit) * (2.5 + 2.5) + var(--nk-vb-font) * var(--nk-vb-line));

    /* - - - THE ROOM AN EXIT TAKES ABOVE THE ISLAND'S MIDDLE (Viewer-Styling.css's --nox-exit-room) : BACK stands on
       the island's middle (below), so half its height, and the room above it (4.5 units). - - - */
    --nk-exit-room: calc(var(--nk-vb-height) / 2 + var(--nk-btn-unit) * 4.5);

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1400;

    /* - - - THE MEDIA'S HEIGHT BUDGET : the island's middle (--nk-island-mid, measured by the script, where BACK
       stands once the island has gone) and the room BACK takes above it, less the body's own 12px bottom padding,
       which already sits between the media and BACK. - - - */
    padding: 0 0 calc(var(--nk-island-mid, 47px) + var(--nk-exit-room) - 12px) 0;

    /* - - - THE OVERLAY ITSELF CARRIES NEITHER THE DIM NOR THE BLUR : an element with a `backdrop-filter` becomes
       the backdrop root of everything inside it. The veil is the pseudo-element below, a sibling of the frame and
       no one's ancestor. - - - */
    opacity: 1;
    background-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    transition: none;
}

@media (orientation: portrait)
{
    #file-context-modal
    {
        --nk-mh: 64dvh;
        --nk-modal-cap-w: 90vw;
        --nk-modal-cap-h: 92.5dvh;
        --nk-vc-margin: calc((0.72816dvmin + 0.32787dvmax) * var(--nk-vfit, 1));
    }
}

/* - - - THE VEIL : the dim and the blur over the page, on their own timings, absolutely positioned across the
   overlay (a `::before` in the flow would be a flex item and shove the frame off centre). Painted before every
   positioned child, so the backdrop and the frame sit above it ; it takes no pointer. It darkens half a fade-in
   after the frame starts, and clears over TWICE a fade-out, one fade-out after the frame has begun to go. - - - */
#file-context-modal::before
{
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0);
    -webkit-backdrop-filter: blur(0px);
    backdrop-filter: blur(0px);
    transition:
        background-color         calc(var(--nk-fade-out) * 2) ease-in-out var(--nk-fade-out),
        backdrop-filter          calc(var(--nk-fade-out) * 2) ease-in-out var(--nk-fade-out),
        -webkit-backdrop-filter  calc(var(--nk-fade-out) * 2) ease-in-out var(--nk-fade-out);
}
#file-context-modal.show::before
{
    background-color: rgba(0, 0, 0, var(--nk-mdim));
    -webkit-backdrop-filter: blur(var(--nk-mblur));
    backdrop-filter: blur(var(--nk-mblur));
    transition:
        background-color         var(--nk-fade-in) ease-in-out calc(var(--nk-fade-in) / 2),
        backdrop-filter          var(--nk-fade-in) ease-in-out calc(var(--nk-fade-in) / 2),
        -webkit-backdrop-filter  var(--nk-fade-in) ease-in-out calc(var(--nk-fade-in) / 2);
}

/* - - - A DIALOG ON ITS WAY OUT TAKES NO PRESS : its overlay stays laid out for three fade-outs while the veil
   clears, and a press in that half second belongs to what is under it. - - - */
#file-context-modal.is-leaving,
#file-context-modal.is-leaving *
{
    pointer-events: none !important;
}

/* - - - THE PAGE BEHIND HOLDS STILL while the viewer is open (the script's `nk-viewer-open`), as Nox Cella's page
   never scrolls : not a wheel, a key or a finger moves it under the viewer. The scrollbar's gutter is kept, so the
   page and the island do not shift sideways as the bar goes. - - - */
html.nk-viewer-open
{
    overflow: hidden;
    scrollbar-gutter: stable;
}

/* - - - THE ISLAND STEPS ASIDE while the viewer is open (2026-10-23, the owner's word : "Remove the island completely
   while viewing the document please") : it fades out as the viewer comes in, over the frame's fade-in, and comes
   back as the viewer leaves, over the two fade-outs the veil takes to clear. BACK stands where its middle was
   (below). The fade is the pill's own opacity, never its holder's : an opacity on an ancestor of the glass would make
   it a backdrop root, and the glass would lose the page behind it for the length of the fade. IT TAKES NO PRESS FROM
   THE MOMENT THE VIEWER OPENS, its holder (`.nk-island`, the empty fixed box round the pill, above the viewer's
   layer) included : left there, that box lay over BACK and every press on BACK was its. Once faded it takes no focus
   either (`visibility`). Until that day the island stayed over the viewer, as Nox Cella's dock stays over its own,
   and any of its buttons closed the viewer first. - - - */
.nk-island .island-shell
{
    transition: opacity calc(160ms * 2) ease-in-out, visibility 0s linear;
}
html.nk-viewer-open .nk-island
{
    pointer-events: none;
}
html.nk-viewer-open .nk-island .island-shell
{
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease-in-out, visibility 0s linear 220ms;
}



/*   = = = = = =   The Frame : no panel, the whole screen   = = = = = =   */

/* - - - The lightbox has no panel : no ground, no border, no radius, no shadow, and the frame is the whole overlay
   above its foot, so the header, the body and the media have the screen to lay out in. Never an opacity on the
   overlay, never a filter on the frame : the frame's own fade is its opacity, and nothing inside it frosts. - - - */
#file-context-modal .context-modal
{
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    text-align: center;

    /* - - - ARRIVING AND LEAVING ARE TWO STATES : this rule is the state the frame arrives OUT OF, `.is-leaving`
       the one it departs INTO. The frame is taken out of the way the instant its own motion ends (`visibility`
       switches at its delay rather than fading). - - - */
    opacity: var(--nk-md-reveal-o);
    transform: scale(var(--nk-md-reveal-s));
    visibility: hidden;
    transition:
        transform  var(--nk-fade-out) ease-in-out,
        opacity    var(--nk-fade-out) ease-in-out,
        visibility 0s linear var(--nk-fade-out);
}
#file-context-modal.is-leaving .context-modal
{
    opacity: var(--nk-md-conceal-o);
    transform: scale(var(--nk-md-conceal-s));
}
#file-context-modal.show .context-modal
{
    opacity: 1;
    transform: scale(1);
    visibility: visible;
    transition:
        transform  var(--nk-fade-in) ease-in-out,
        opacity    var(--nk-fade-in) ease-in-out,
        visibility 0s linear;
}

/* - - - THE HEADER : in the flow, undressed (the lightboxes keep no band). The room above and below the name
   follows a short screen (--nk-vfit). - - - */
#file-context-modal .context-modal-header
{
    position: static;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(20px * var(--nk-vfit, 1)) 24px calc(4px * var(--nk-vfit, 1)) 24px;
    background: transparent;
    border-bottom: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}
#file-context-modal .Modal-HeaderSection
{
    container-type: inline-size;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
}

/* - - - THE TITLE : the viewer's (ui.viewer.title, universal, and its PDF family the same), in the viewer's own
   room (its Modal Frame's title spacing). The section's name, uppercased by the script as Nox Cella writes a
   file's name. ON ONE LINE (2026-11-10, the owner's word) : its size held to its row by its own width in ems. - - - */
#file-context-modal .Modal-SectionTitle
{
    padding: calc((0.75rem + 0.3vw) * var(--nk-vfit, 1)) 0 calc((0.75rem + 0.3vw) * var(--nk-vfit, 1));
    font-size: min(calc(0.75rem + 0.75vw), calc(100cqi / var(--nk-modal-title-ems, 24)));
    letter-spacing: calc(var(--nk-modal-title-track, 0.133) * 1em);
    line-height: 1.2;
    font-weight: inherit;
    color: var(--primary-color);
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    -webkit-user-select: none;
    user-select: none;
}

/* - - - THE BODY : the one surface that could scroll. The media is bound by the room it has (below), so nothing in
   it overflows and the picture sits CENTRED (`margin: auto` can only centre what does not overflow). Its gutter is
   kept on both edges, so a scrollbar never moves the column off centre. The horizontal axis never scrolls, and a
   pan here never chains to the page behind. - - - */
#file-context-modal .context-modal-body
{
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 24px 12px 24px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable both-edges;
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-rgb), 0.45) transparent;
    touch-action: pan-y;
    overscroll-behavior: contain;
}



/*   = = = = = =   The Stage : the media alone   = = = = = =   */

/* - - - Auto margins centre the media in the leftover room when it is short. `position: relative` is the working
   mark's place. - - - */
#file-context-modal .viewer-stage
{
    position: relative;
    margin: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* - - - THE WORKING MARK : the editor's short accent bar, at the centre of the media's room while the page is on its
   way, drawn once the wait has outlasted 200ms (`is-working`, the script). `top` and not a translateY : the
   keyframes own `transform`. A gradient, never a flat translucent fill : Chrome's forced dark mode turns that
   opaque. - - - */
#file-context-modal .viewer-busy
{
    position: absolute;
    left: 50%;
    top: calc(50% - 1.5px);
    transform: translateX(-50%);
    z-index: 11;
    width: 26px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(rgba(var(--accent-rgb), 0.85), rgba(var(--accent-rgb), 0.85));
    opacity: 0;
    transition: opacity 0.18s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}
#file-context-modal .viewer-stage.is-working .viewer-busy
{
    opacity: 1;
    animation: nkViewerBusy 1.1s ease-in-out infinite;
}
@keyframes nkViewerBusy
{
    0%   { transform: translateX(-50%) scaleX(0.35); opacity: 0.45; }
    50%  { transform: translateX(-50%) scaleX(1);    opacity: 1; }
    100% { transform: translateX(-50%) scaleX(0.35); opacity: 0.45; }
}

#context-preview-container
{
    display: none;
    width: 100%;
    margin-top: 8px;
    z-index: 10;
    text-align: center;
}

/* - - - THE PAGE'S BOUNDS : the viewer's frame (its width, its height, 72% or 64% of the screen's), the caps, and
   the room the body actually has, as a min() of each : never wider than the body (a picture wider than it drew a
   scrollbar along its foot), never taller than its room (--nk-viewer-room, measured by the script : the body's
   content height less this container's top margin). THE FOURTH TERM IS THE PILE : the same bound, less the page's
   number's line, divided by 1 plus the strips the pages behind show beneath it, so the page, its pile and its
   number fit where the picture alone did ; absent, it is the bound itself. The script writes `display: block` on
   it, and a block is centred by its auto margins. - - - */
#context-preview-img
{
    width: auto;
    max-width: min(var(--nk-mw), var(--nk-modal-cap-w), 100%);
    max-height: min(var(--nk-mh), var(--nk-modal-cap-h), var(--nk-viewer-room, 100dvh),
                    calc((min(var(--nk-mh), var(--nk-modal-cap-h), var(--nk-viewer-room, 100dvh)) - var(--nk-doc-pile-pad, 0px) - var(--nk-doc-pile-slack, 0px)) / var(--nk-doc-pile-factor, 1)));
    margin: 0 auto;
    border-radius: 0;
    object-fit: contain;
    background: #000000;
}



/*   = = = = = =   A Document of Several Pages, as a Pile   = = = = = =   */

/* - - - The viewer's own picture follows the open page and lends its box : every page is a `.doc-sheet` laid over
   that box, the open one on top and the pages after it behind, lower and narrower, at half opacity. Every sheet
   FILLS the box (cover, cut from its bottom edge, never squashed), so the pages behind take the shape of the page
   on top. The script writes the box (--nk-doc-w / -h / -top), the strips' height (--nk-doc-strips) and the pile's
   share of the page (--nk-doc-pile-factor) on the container ; the padding below holds the strips and the number.
   The slack comes off the picture's height and is NOT given to the padding, so a pile one pixel taller than the
   room never makes the body scroll. `touch-action: none` hands both axes to the script : a vertical swipe turns the
   pages. - - - */
#context-preview-container.has-doc-pile
{
    position: relative;
    --nk-doc-pile-pad: 0px;
    --nk-doc-pile-slack: 2px;
    padding-bottom: calc(var(--nk-doc-strips, 0px) + var(--nk-doc-pile-pad, 0px));
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
#context-preview-container.has-doc-pile.has-doc-counter
{
    --nk-doc-pile-pad: calc(var(--nk-vc-size) * 1.25 + var(--nk-vc-margin));
}
/* - - - On the top sheet's level until that sheet draws the same picture, so the pages behind never show through
   it ; then hidden, keeping its box. - - - */
#context-preview-container.has-doc-pile #context-preview-img
{
    position: relative;
    z-index: 50;
}
#context-preview-container.has-doc-pile.is-doc-drawn #context-preview-img
{
    visibility: hidden;
}
#context-preview-container.is-doc-pending
{
    opacity: 0;
}

#context-preview-container .doc-sheet
{
    position: absolute;
    top: var(--nk-doc-top, 0px);
    left: 0;
    right: 0;
    margin: 0 auto;
    width: var(--nk-doc-w, 0px);
    height: var(--nk-doc-h, 0px);
    max-width: none;
    object-fit: cover;
    object-position: 50% 100%;
    transform-origin: 50% 100%;
    border-radius: 0;
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

/* - - - "2 / 3", at the bottom right of the page, under its pile : the look of the viewer's counter
   (ui.viewer.counter). - - - */
#context-preview-container .doc-page-counter
{
    display: none;
    position: absolute;
    bottom: 0;
    right: calc(50% - var(--nk-doc-w, 0px) / 2);
    z-index: 60;
    font-size: var(--nk-vc-size);
    letter-spacing: var(--nk-vc-spacing);
    line-height: 1.25;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}
#context-preview-container.has-doc-pile.has-doc-counter .doc-page-counter
{
    display: block;
}



/*   = = = = = =   Each Page Zoomed   = = = = = =   */

/* - - - THE OPEN PAGE ENLARGES IN ITS OWN BOX (2026-10-23, the owner's word : "Allow the ability to zoom each page
   respectively. Implement it in a way that makes sense with the current structure and view of pdf files") : the
   page, its pile, its number, the title and BACK keep their places, and the page on top is shown larger WITHIN the
   box it fills, as through a window : `.doc-zoom`, laid by the script over the open page's box (the viewer's own
   picture's, which every sheet borrows) above the pile and under the number, clipping a copy of that page
   (`.doc-zoom-page`, the same picture, so nothing is fetched) that the script enlarges and moves with a transform
   from its top left corner. It is there only while the page is enlarged (`is-on`) ; at its plain size the page is
   the pile's own again. It takes no press : the container answers every gesture (NkPageZoom, DocumentViewer-
   Script.js), so the container hands both axes and a pinch to the script whether or not the document is a pile,
   and nothing in it is selected by a double press. A page enlarged can be grabbed (the cursor says so). - - - */
#file-context-modal #context-preview-container
{
    position: relative;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
#context-preview-container .doc-zoom
{
    position: absolute;
    display: none;
    overflow: hidden;
    z-index: 55;
    pointer-events: none;
}
#context-preview-container .doc-zoom.is-on
{
    display: block;
}
#context-preview-container .doc-zoom-page
{
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    object-position: 50% 100%;
    transform-origin: 0 0;
    border-radius: 0;
}
#context-preview-container.is-zoomed
{
    cursor: grab;
}
#context-preview-container.is-zoomed.is-panning
{
    cursor: grabbing;
}



/*   = = = = = =   BACK : small, centred, where the island was   = = = = = =   */

/* - - - THE VIEWER'S BACK IS ANCHORED TO THE ISLAND'S PLACE, NOT TO THE MEDIA : a child of the OVERLAY after the frame
   (the frame's transform would contain it), its middle on the island's middle (--nk-island-mid, the script's), since
   the island steps aside while the viewer is open (2026-10-23 ; till then BACK stood a fixed distance above it),
   whatever the page's height, centred by auto margins (its press scales it, and a centring transform would have to
   be restated there). It mirrors the frame's arrival and departure, and keeps a 0.3s hover and press.
   ITS WORD CASTS THE SIGNATURE'S SHADOW (2026-10-23, the owner's word : "the back button does not have a backdrop for
   easier view. Fix this immediately") : a browser gives every button `text-shadow: none`, so BACK alone had none of
   the letters' hairline the body gives every word, and standing where the island was it lies over the page's own
   light colours. The signature's figures (Nk-Config.php `signature`, the effects editor's "The signature"), the
   shadow the owner chose for a line over busy colours : a whole pixel down and to the right, nearly black. - - - */
#file-context-modal > .viewer-back
{
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(var(--nk-island-mid, 47px) - var(--nk-vb-height) / 2);
    z-index: 20;
    width: max-content;
    margin: 0 auto;
    padding: calc(var(--nk-btn-unit) * 2.5) calc(var(--nk-btn-unit) * 6.5);
    background: transparent;
    border: none;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: var(--nk-vb-font);
    letter-spacing: var(--nk-vb-spacing);
    line-height: var(--nk-vb-line);
    text-transform: uppercase;
    text-shadow: var(--nk-logo-shadow-x, 1px) var(--nk-logo-shadow-y, 1px) var(--nk-logo-shadow-blur, 0.3px) rgba(var(--shadow-rgb), var(--nk-logo-shadow-alpha, 0.9));
    cursor: pointer;

    opacity: var(--nk-md-reveal-o);
    visibility: hidden;
    transition:
        opacity    var(--nk-fade-out) ease-in-out,
        visibility 0s linear var(--nk-fade-out),
        color      0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform  0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#file-context-modal.is-leaving > .viewer-back
{
    opacity: var(--nk-md-conceal-o);
}
#file-context-modal.show > .viewer-back
{
    opacity: 1;
    visibility: visible;
    transition:
        opacity    var(--nk-fade-in) ease-in-out,
        visibility 0s linear,
        color      0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform  0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
@media (hover: hover)
{
    #file-context-modal > .viewer-back:hover
    {
        color: var(--text-main);
    }
}
#file-context-modal > .viewer-back:active
{
    transform: scale(0.94);
}
#file-context-modal > .viewer-back:focus-visible
{
    outline: 1px solid rgba(var(--accent-rgb), 0.6);
    outline-offset: 2px;
}



/*   = = = = = =   The Media Backdrop : the page itself, behind it   = = = = = =   */

/* - - - A blurred, dimmed and enlarged copy of the page, filling the overlay, so the room round the page is the page
   itself rather than black. The script paints a SMALL canvas, already blurred and dimmed ; this only stretches it
   over the overlay (`object-fit: cover`) and enlarges it by the zoom (--nk-bd-zoom). It takes no pointer. The
   overlay's FIRST child : painted over the veil (`::before`, earlier in tree order) and under the frame and BACK.
   A leaf with no backdrop-filter beneath it, so its opacity makes nothing a backdrop root. - - - */
#file-context-modal > .nk-media-backdrop
{
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--nk-bd-fade, 320ms) cubic-bezier(0.25, 0.8, 0.25, 1);
}
#file-context-modal > .nk-media-backdrop.is-shown
{
    opacity: 1;
}

/* - - - TWO CANVASES, laid over each other : the one in use, and the spare the next page is painted into. The one
   coming in is laid last ; `is-gone` holds a canvas at 0, and `is-crossfading` gives both the crossfade's clock
   (--nk-bd-xfade, 300ms) while the new one fades in and the old one out, together. Each carries its own zoom. - - - */
#file-context-modal .nk-media-backdrop-canvas
{
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: cover;
    transform: scale(var(--nk-bd-zoom, 1.25));
    transform-origin: 50% 50%;
    opacity: 1;
}
#file-context-modal .nk-media-backdrop-canvas.is-gone
{
    opacity: 0;
}
#file-context-modal .nk-media-backdrop-canvas.is-crossfading
{
    transition: opacity var(--nk-bd-xfade, 300ms) linear;
}



/*   = = = = = =   Motion is a preference ; "none" is an accessibility setting   = = = = = =   */

@media (prefers-reduced-motion: reduce)
{
    #file-context-modal::before,
    #file-context-modal.show::before,
    #file-context-modal .context-modal,
    #file-context-modal.show .context-modal,
    #file-context-modal.is-leaving .context-modal,
    #file-context-modal > .viewer-back,
    #file-context-modal.show > .viewer-back,
    #file-context-modal.is-leaving > .viewer-back,
    #file-context-modal > .nk-media-backdrop,
    #file-context-modal .nk-media-backdrop-canvas.is-crossfading,
    #file-context-modal .viewer-busy,
    .nk-island .island-shell,
    html.nk-viewer-open .nk-island .island-shell
    {
        transition: none;
    }
    #file-context-modal .context-modal,
    #file-context-modal.is-leaving .context-modal
    {
        transform: none;
    }
    #file-context-modal .viewer-stage.is-working .viewer-busy
    {
        animation: none;
    }
}



/* - - - Author : Nikolaos S. Kaounas - - - */
