@keyframes zoom-in-zoom-out {
    0% {
        scale: 100%;
    }
    50% {
        scale: 80%;
    }
    100% {
        scale: 100%;
    }
}

:root {
  --safe-area-inset-top: env(safe-area-inset-top);
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
  --full-height-legacy: calc(100vh + env(safe-area-inset-top) + env(safe-area-inset-bottom));
  --full-height: calc(100dvh + env(safe-area-inset-top) + env(safe-area-inset-bottom));
}

#n2i-html, #n2i-html > body {
    width:100%;
    height:100%;
    overflow: hidden;
    display: block !important;
    touch-action: none;
}

#n2i-html > body {
    background-color: black;
}

.n2i-absolute {
    display:block;
    position: absolute;
}

.n2i-centered {
    display:block;
    position: absolute;
    /* keep % sizes as dv* are not widely supported */
    left: 50%;
    left: 50dvw;
    top: 50%;
    top: 50dvh;
    margin-right: -50%;
    margin-right: -50dvw;
    transform: translate(-50%, -50%);
}

.n2i-portrait {
    width: 100vw;
    width: 100dvw;
    height: 177.78vw;
    height: 177.78dvw;
    max-height: var(--full-height-legacy);
    max-height: var(--full-height);
    max-width: 56.25vh;
    max-width: 56.25dvh;
}

.n2i-landscape {
    width: 100vw;
    width: 100dvw;
    height: 56.25vw;
    height: 56.25dvw;
    max-height: var(--full-height-legacy);
    max-height: var(--full-height);
    max-width: 177.78vh;
    max-width: 177.78dvh;
}

.n2i-hidden {
    display: none !important;
}

.n2i-hidden2 {
    display: none !important;
}

.n2i-hidden-fadeout {
  opacity: 0;
  transition: opacity 1s linear;
}

#n2i > canvas {
    outline: none; /* disables focus border line */
}

#n2i-player {
    z-index: -10;
}

#n2i-player > video {
    width: 100%;
}

#n2i-statusBar {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: +2;
    font-family: monospace;
    padding: 4px 6px;
    opacity: 0.8;
}

#n2i-console {
    z-index: 98;
    font-weight: bold;
    text-align: right;
    background-color: transparent;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

#n2i-console > span {
    background-color: rgba(255, 255, 255, 0.4);
}

#n2i-muted {
    z-index: 65;
    width: 10%;
    position: absolute;
    top: env(safe-area-inset-top);
    opacity: 50%;
}

@keyframes blinker {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.n2i-blink {
    animation: blinker 2s ease-in-out infinite;
}

.n2i-not-transparent {
    opacity: 1 !important;
}

.n2i-grayscale {
    filter: grayscale(1);
}

.n2i-dark-transparent {
    background-color: rgba(0, 0, 0, 0.7);
}

#n2i-network-quality {
    z-index: 20;
    width: 8%;
    top: env(safe-area-inset-top);
    right: 0;
    position: absolute;
    margin: 1em;
    transition: all 1s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

.n2i-network-quality-img {
    width: 100%;
    height: 100%;
    max-height:100%;
    max-width:100%;
    object-fit: contain;
}

#n2i-rotator {
    z-index: 10;
    position: absolute;
    width: 100%;
    height: 100%;
    display: block;
    background: url(./rotator-CX18TWRN.png), black;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
}

@keyframes n2i-spinner {
  to {transform: translate(-50%, -50%) rotate(360deg);}
}

#n2i-spinner > div:before {
    content: '';
    box-sizing: border-box;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6vw;
    width: 6dvw;
    height: 6vw;
    height: 6dvw;
    border-radius: 50%;
    border: 3px solid #ccc;
    border-top-color: #d00;
    animation: n2i-spinner .6s linear infinite;
    transform: translate(-50%, -50%) rotate(0deg); /* start state */
    max-width: 100px;
    max-height: 100px;

}

#n2i-spinner.n2i-splash-visible > div:before {
    top: 80%;
}

#n2i-spinner {
    position: absolute;
    width: 100vw;
    width: 100dvw;
    height: var(--full-height-legacy);
    height: var(--full-height);
    z-index: +5;
}

#n2i-spinner.n2i-splash-visible {
    background-color: transparent !important;
}

#n2i-splash {
    z-index: +4;
    position: absolute;
    top: 0;
    width: 100vw;
    width: 100dvw;
    height: var(--full-height-legacy);
    height: var(--full-height);
    background-position: center;
    background-size: cover;
    background-color: transparent;
}

.n2i-blue-border > div:before {
    border-top-color: #07d !important;
}

.n2i-green-border > div:before {
    border-top-color: #0a1 !important;
}

.n2i-grayed {
    opacity: 0.3 !important;
}

#n2i-message, #n2i-reload, #n2i-toast {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: Fredoka, sans-serif;
}

#n2i-message, #n2i-toast {
    width: 100%;
    z-index: 16;
    padding: 0 10% 0 10%;
}

#n2i-message {
    top: calc(5% + env(safe-area-inset-top));
    font-size: 2em;
}

/* error */
#n2i-message.n2i-message-5 {
    text-shadow: 3px 3px #cf0d0d;
}

/* user message */
#n2i-message.n2i-message-10 {
    text-shadow: 3px 3px #3641b9;
}

#n2i-reload {
    width: 100%;
    height: 100%;
    z-index: 15;
    backdrop-filter: blur(4px);
}

#n2i-reload-button {
    width: 70%;
    font-size: 10vw;
    font-size: 10dvw;
    line-height: 1em;
    box-shadow: 5px 5px black;
    text-shadow: 5px 5px black;
    animation: zoom-in-zoom-out 1s cubic-bezier(0.33, 1, 0.68, 1) infinite;
    cursor: pointer;
    border: 6px solid white;
    border-radius: 10vw;
    border-radius: 10dvw;
    padding: 0.2em;
    background-color: rgba(255, 255, 255, 0.2);
}

#n2i-toast {
    bottom: 5%;
    font-size: 1.5em;
    background-color: rgba(0, 0, 0, 0.6);
}

#n2i-dialog {
    text-align: center;
    color: white;
    font-family: Fredoka, sans-serif;
    width: 80%;
    z-index: 20;
    font-size: 2em;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 100%;
}

#n2i-dialog-ok, #n2i-dialog-cancel {
    padding-top: 1em;
    cursor: pointer;
}

#n2i-a2hs {
    z-index: 20;
}

.n2i-movable {
    position: absolute;
    cursor: move;
}

#n2i-menu {
    z-index: 100;
    position: absolute;
    width: 3em;
    max-height: 3em;
    background-color: white;
    opacity: 50%;
    left: 2em;
    top: calc(2em + env(safe-area-inset-top));
    transition: max-height .3s;
    overflow: hidden;
    border-radius: 0.3em;
}

#n2i-menu .n2i-menu-button {
    width: 2em;
    height: 2em;
    margin: 0.5em;
    cursor: pointer;
    background-repeat: no-repeat;
}

/* icons from https://remixicon.com/collection */
#n2i-menu-button-toggle {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAA/UlEQVRYR+2U0Q3CMAxE2w0YoSOwATAJMAITwCZ0E8oGHYEVmADuJEBtFDexFJN8JJJVCVLfy/Xitsm82sz6TQUo0oEBuXgpsrET9q7x+x51Wurlc0Ajzt6+HhS/oVaoHnWUIKwADhC8TkRFCMsMREFYAtCAIIQ1QBDiHwCE4M3afDLxxJMhfUgJVtzAqK0MIK8jF8W3qPH7prUDi+KSAyTUzIK74ENQXALQiEs9LvjjLNk+BbYaRJyAA6pzv7nrlg+An0CzKORbhCDAL3C+TdYhDB6kAlQHinRAO4iCSXc2zA6dYhAlB5AGi1ZI2j8bdEVmINVJo/pUB7I78AalxSkh6NpzkgAAAABJRU5ErkJggg==);
}
#n2i-menu-button-toggle.alt {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABBklEQVRYR+1WwQ3CMAxsJ2AFRmAEmASxCWzACIxSNmAERmAD8EmxlKRuHRfSCMmR8mns3Pl8sdp3jVffGL9zAn+hwJV8cqP9mPDLQN/fBi8d4lhNAQAfab9oI1EiYQEHdoI5R4DBmfApKJEXW4VAKbhBeTlUUmA18FE/gsTouSb715XzBbEC22CyTTiEuxPH/gw1uihvwY7OAMwk0A6Yr9qSPLAqialnaCGxJ3ksT/Eeyzk3B3ISF0o8C72wgI+Mr01CJvGkTFSKiZivqgQABhIgIIHjHMQsayhtgeXSxbFaCxZfXJroBFwBSQHruy71G8epf0TNCSSDwlpeQXwyuNyErkBzBT5u3CghXa8O8wAAAABJRU5ErkJggg==);
}

#n2i-menu-button-audio {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABjElEQVRYR+1W0XHCMAyFCcoGdIOyQWGCdoR0ErIBZQLKBHSDZo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1sxN4BmRCmsuaUpecmQE+nOW0ikGG2P0YdXmhICMW5bmUowbO1Xfo5TGSlJ7PVpGT2RbHBqz8u61j8kERyAZzmtNkeAcnAmOEPf8qGc89FYiXxeVhY4h8FaCPP+zwXPsfcCp2OosQBasjGuybFfBWuttTsCnSvwCxqIYiFZKGROAAAAAElFTkSuQmCC);
}

#n2i-menu-button-fullscreen {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAsUlEQVRYR2NkGGDAOMD2M4w6ADkEHIDRsR9PlBwEyoHUEAMOABXZ41HoCJQDqUGJgkHlgItAx31A88EFIL+AGO8D1UwAYgM0tQJAvj5UjGAIwBUQaSExypBDeNQBoyGANQSISUhUVzNaFI+GwGgIDKoQwFpZUDHjj1ZGoyFAUgiAml/oTTJQM42UJhms+QVLx6AmGayZRrA9gC3xD/9WMRWzPPFGDaqSkHhnU1HlgIcAAPSERCFpbGERAAAAAElFTkSuQmCC);
}
#n2i-menu-button-fullscreen.alt {
    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAnElEQVRYR2NkGGDAOMD2M4w6gJgQ+A+NpoNA2oHIKDsAVGcPVYvXjlEHjIYAcggYABNNP5ZEBkt45CZCUIJEB4VAgQsgQWQHgCzajyeVk+sAbEY6AgXBDhtUDiAyi1NXGTG5gLo2opk26oDREBgNgUFVEA14UQyqjCZgKXVgLRty6wKQPnRQgK0ywlXijTbJRkNgwENgtDoe3iEAAO3kOCGfIxqzAAAAAElFTkSuQmCC);
}
#n2i-menu-button-back {
    background-image: url(./back-zQjl-Pan.png);
}

@keyframes zoom {
    30% {
        scale: 1;
    }
    50% {
        scale: 0.7;
    }
    70% {
        scale: 1;
    }
}

#n2i-pointer {
    position: absolute;
    z-index: +5;
    pointer-events: none;
}

#n2i-pointer-hole {
    position: absolute;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    border-radius: 1em;
}

#n2i-pointer-hole > div > img {
    animation: zoom 1s ease-in-out infinite;
    width: 70%;
    height: auto;
    margin-top: 30%;
    margin-left: 21%;
}

#n2i-countdown {
    z-index: 90;
    position: absolute;
    top: calc(2vw + env(safe-area-inset-top));
    top: calc(2dvw + env(safe-area-inset-top));
    right: 2vw;
    right: 2dvw;
}

#n2i-countdown > svg {
    width: 100%;
    height: 100%;
}

#n2i-countdown > svg > circle {
    fill: none;
    stroke-opacity: 0.3;
    transform-origin: center center;
    transform: rotate(-90deg);
}

#n2i-countdown > svg > circle + circle {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    stroke-linecap: round;
    stroke-opacity: 1;
    transition: stroke-dashoffset 1s linear;
}

#n2i-countdown.n2i-hidden > svg > circle + circle {
    transition: none;
}

#n2i-countdown > svg > text {
    font-family: sans-serif;
}

#n2i-cta {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: var(--full-height-legacy);
    height: var(--full-height);
    z-index: 70;
    background-color: rgba(0, 0, 0, 0.6);
}

#n2i-cta-container.n2i-cta-image {
    width: 100%;
    height: 100%;
}

#n2i-cta-container:not(.n2i-cta-image) {
    width: 90vw;
    width: 90dvw;
    height: calc(var(--full-height-legacy) - 10vw);
    height: calc(var(--full-height) - 10dvw);
    margin: 5vw;
    margin: 5dvw;
    box-shadow: 5px 5px black;
    border: 3px solid white;
    border-radius: 5vw;
    border-radius: 5dvw;
}

#n2i-cta-cross {
    position: absolute;
    width: 10vw;
    width: 10dvw;
    height: auto;
    z-index: 71;
    top: 6vw;
    top: 6dvw;
    right: 6vw;
    right: 6dvw;
    cursor: pointer;
}

#n2i-cta-banner {
    z-index: 60;
    position: relative; /* to get z ordering */
    cursor: pointer;
    border-bottom: 1px solid white;
}

#n2i-infos {
    z-index: 99;
    width: fit-content;
    position: absolute;
    right: 0;
    bottom: 0;
    padding: 5px;
    /* user-select: none; */
    max-width: 90%;
    max-height: 50%;
    overflow: auto;
}

#n2i-infos > div {
    border: 1px solid black;
    display: inline-block;
    background: #fffe;
    padding: 2px;
}

#n2i-infos details:not(:first-of-type) {
    border-top: 1px solid black;
}

#n2i-infos summary {
    cursor: pointer;
}

#n2i-infos pre {
    margin: 0;
}

#n2i-infos button {
    margin: 2px;
}
#n2i-infos input[type=number] {
    width: 3em;
}

#n2i-infos li {
    list-style-position: inside;
    text-wrap: nowrap;
    padding-left: 1ch;
}

#n2i-infos li span:first-of-type {
    font-weight: bold;
}

#n2i-footer {
    position: absolute;
    width: 100vw;
    width: 100dvw;
}

#n2i-iframe {
    width: 100%;
    height: 100%;
    border: none;
    z-index: 30;
}

#n2i-iframe-header {
    width: 100%;
    z-index: 30;
    display: flex;
    justify-content: right;
    align-items: center;
    cursor: pointer;
}

#n2i-paypal-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    z-index: 40;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
}

#n2i-paypal-dialog {
    position: relative;
    width: 80%;
    max-width: 480px;
    max-height: 90vh;
    max-height: 90dvh;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 1em;
    padding: 2em 1.5em 1.5em;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    overflow: visible;
}

#n2i-paypal-cross {
    position: absolute;
    top: -0.75em;
    right: -0.75em;
    cursor: pointer;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 50%;
}

#n2i-paypal-cross > svg {
    width: 1.5em;
    height: 1.5em;
    display: block;
}

#n2i-paypal-cross:hover {
    opacity: 1;
}

#n2i-paypal-buttons-container {
    width: 100%;
    max-height: 80vh;
    max-height: 80dvh;
    overflow-y: auto;
    overflow-x: hidden;
}