/* POPUP occupies only a marker in document flow. The authored content is shown
   in a viewport-fixed layer controlled by popup-frontend.js. */
.nevv-block--popup,
.nevv-block--runtime-popup {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    border: 0 !important;
}
.nevv-block--popup > .nevv-block__content,
.nevv-block--runtime-popup > .nevv-block__content {
    width: 100% !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
}
.nevv-popup-runtime-root {
    position: relative;
    width: 100%;
    height: 0;
    min-height: 0;
    overflow: visible;
}
.nevv-popup-marker {
    position: absolute;
    top: 0;
    left: 50%;
    display: block;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.nevv-popup-layer[hidden] { display: none !important; }
.nevv-popup-layer {
    position: fixed;
    inset: 0;
    z-index: 2147482400;
    display: block;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    pointer-events: none;
    isolation: isolate;
}
.nevv-popup-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: var(--nevv-popup-backdrop, rgba(0,0,0,.45));
    backdrop-filter: blur(var(--nevv-popup-backdrop-blur, 0px));
    -webkit-backdrop-filter: blur(var(--nevv-popup-backdrop-blur, 0px));
    pointer-events: auto;
}
.nevv-popup-layer[data-nevv-popup-backdrop-enabled="0"] .nevv-popup-backdrop {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}
.nevv-popup-positioner {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    padding: max(var(--nevv-popup-offset, 25px), var(--nevv-popup-safe-margin, 25px));
    pointer-events: none;
}
.nevv-popup-layer[data-nevv-popup-position^="top-"] .nevv-popup-positioner { align-items: flex-start; }
.nevv-popup-layer[data-nevv-popup-position^="center-"] .nevv-popup-positioner { align-items: center; }
.nevv-popup-layer[data-nevv-popup-position^="bottom-"] .nevv-popup-positioner { align-items: flex-end; }
.nevv-popup-layer[data-nevv-popup-position$="-left"] .nevv-popup-positioner { justify-content: flex-start; }
.nevv-popup-layer[data-nevv-popup-position$="-center"] .nevv-popup-positioner { justify-content: center; }
.nevv-popup-layer[data-nevv-popup-position$="-right"] .nevv-popup-positioner { justify-content: flex-end; }
.nevv-popup-scale-box {
    position: relative;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    pointer-events: none;
}
.nevv-popup-dialog {
    position: relative;
    box-sizing: border-box;
    width: var(--nevv-popup-base-width, 640px);
    height: auto;
    max-width: none;
    max-height: none;
    overflow: hidden;
    border-width: var(--nevv-popup-border-width, 0px);
    border-style: var(--nevv-popup-border-style, none);
    border-color: var(--nevv-popup-border-color, #d6dee8);
    border-radius: var(--nevv-popup-radius, 0px);
    background: transparent;
    box-shadow: 0 20px 70px rgba(0,0,0,.24);
    pointer-events: auto;
    overscroll-behavior: contain;
}
.nevv-popup-content {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 0;
    border-radius: inherit;
    overflow: hidden;
}
.nevv-popup-layer[data-nevv-popup-base-height-mode="px"] .nevv-popup-content { height: 100%; }
.nevv-popup-content > .nevv-layout-content,
.nevv-popup-content > .nevv-ai-html-block { min-height: 100%; }
.nevv-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: #111;
    box-shadow: 0 3px 14px rgba(0,0,0,.2);
    font: 700 28px/1 Arial, sans-serif;
    cursor: pointer;
    pointer-events: auto;
    transform: none !important;
}
.nevv-popup-close[hidden] { display: none !important; }
.nevv-popup-close:hover { background: #fff; }
.nevv-popup-close:focus-visible { outline: 3px solid rgba(47,128,237,.5); outline-offset: 2px; }
html.nevv-popup-scroll-locked,
body.nevv-popup-scroll-locked { overflow: hidden !important; }
@media (prefers-reduced-motion: no-preference) {
    .nevv-popup-layer.is-opening .nevv-popup-scale-box { animation: nevv-popup-enter .18s ease-out both; }
    .nevv-popup-layer.is-opening .nevv-popup-backdrop { animation: nevv-popup-fade .18s ease-out both; }
}
@keyframes nevv-popup-enter { from { opacity:0; } to { opacity:1; } }
@keyframes nevv-popup-fade { from { opacity:0; } to { opacity:1; } }

/* POPUP dimensions are resolved proportionally by popup-frontend.js. */
.nevv-popup-layer[data-nevv-popup-preview="1"] .nevv-popup-close {
    display: none !important;
}
