/* Native image viewing for the retained classic download presentation. */
html.riko-native-gallery-open { overflow:hidden; scrollbar-gutter:stable; }
.riko-native-gallery {
    width:fit-content;
    max-width:calc(100% - 40px);
    max-height:calc(100dvh - 100px);
    margin:auto;
    padding:0;
    overflow:visible;
    border:0;
    border-radius:4px;
    color:var(--riko-text);
    background:var(--riko-surface);
}
.riko-native-gallery::backdrop { background:var(--riko-overlay); }
.riko-native-gallery figure { position:relative; margin:0; max-height:calc(100dvh - 100px); overflow:auto; }
.riko-native-gallery img { display:block; width:auto; max-width:100%; max-height:calc(100dvh - 100px); object-fit:contain; margin:auto; cursor:zoom-in; }
.riko-native-gallery img.is-zoomed { max-height:none; max-width:none; width:175%; cursor:zoom-out; }
.riko-native-gallery figcaption { position:absolute; inset:auto 0 0; padding:10px 16px; color:var(--riko-inverse); background:var(--riko-overlay); }
.riko-native-gallery__actions { position:absolute; inset:0; pointer-events:none; z-index:1; }
.riko-native-gallery button {
    position:absolute; display:grid; place-items:center; width:50px; height:50px;
    padding:0; color:var(--riko-inverse); background:transparent; border:0;
    pointer-events:auto; font:400 28px/1 Arial,sans-serif;
}
.riko-native-gallery [data-riko-gallery-action="close"] { inset:-12px -12px auto auto; border-radius:50%; background:var(--riko-artwork-surface); color:var(--riko-artwork-ink); font-size:24px; }
.riko-native-gallery [data-riko-gallery-action="previous"],
.riko-native-gallery [data-riko-gallery-action="next"] { top:calc(50% - 25px); }
.riko-native-gallery [data-riko-gallery-action="previous"] { left:5px; }
.riko-native-gallery [data-riko-gallery-action="next"] { right:5px; }
.riko-native-gallery [data-riko-gallery-action="previous"]::before,
.riko-native-gallery [data-riko-gallery-action="next"]::before { content:""; width:18px; height:18px; border:solid currentColor; border-width:0 3px 3px 0; transform:rotate(-45deg); }
.riko-native-gallery [data-riko-gallery-action="previous"]::before { transform:rotate(135deg); }
.riko-native-gallery [data-riko-gallery-action="zoom"] { inset:auto auto 10px 10px; opacity:0; background:var(--riko-overlay); }
.riko-native-gallery [data-riko-gallery-action="zoom"]:focus-visible { opacity:1; }
.riko-native-gallery button:hover { opacity:.8; }
.riko-native-gallery button:focus-visible { outline:3px solid var(--riko-focus); outline-offset:3px; }

/* The download-limit notice keeps its original modal interaction. */
body.riko-native dialog.riko-limit-dialog { width:min(600px,calc(100% - 20px)); padding:20px; border-radius:4px; }
.riko-native .riko-limit-dialog p { margin:0 0 20px; }
.riko-limit-dialog__message { margin:0 0 20px; }
.riko-limit-dialog__actions { display:flex; justify-content:flex-end; }
body.riko-native .riko-limit-dialog [data-riko-dialog-close] { margin:0; min-height:30px; padding:0 12px; color:var(--riko-action-contrast); background:var(--riko-action); border-color:var(--riko-action-line); font-size:14px; line-height:28px; }
