/* Overlay */
.qn-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease-in;
}
.qn-popup-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
/* Popup container */
.qn-popup {
    background: #fff;
    padding: 20px;
    max-width: 900px;
    width: 90%;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.4);
    margin-right: 10px;
    margin-left: 10px;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
    
    max-height: 90vh;
    overflow: hidden;      /* prevent scrollbars */
    flex-shrink: 1;        /* allow shrinking */
}
.qn-popup.pre-animate {
    transform: translateY(-120px);
    opacity: 0;
}

/* Close button */
.qn-close {
    position: absolute;
    top: 2px;
    right: 10px;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}
/* Image layout */
.qn-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    max-height: 80vh;
    min-height: 0;
}
.qn-images img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    max-height: 80vh;
    min-height: 0;
    object-fit: contain;
    flex-shrink: 1;
}
/* Stack on mobile */
@media (max-width: 768px) {
    .qn-images {
        flex-direction: column;
    }
}