/* Wrapper */
.newline-popup-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: none; /* Hidden by default, toggled by JS */
    justify-content: center; /* Default center, overridden by classes */
    align-items: center;     /* Default center */
}

/* Positioning */
.newline-pos-center {
    justify-content: center;
    align-items: center;
}

.newline-pos-top-left {
    justify-content: flex-start;
    align-items: flex-start;
}
.newline-pos-top-left .newline-popup-container {
    margin: 20px;
}

.newline-pos-top-right {
    justify-content: flex-end;
    align-items: flex-start;
}
.newline-pos-top-right .newline-popup-container {
    margin: 20px;
}

.newline-pos-bottom-left {
    justify-content: flex-start;
    align-items: flex-end;
}
.newline-pos-bottom-left .newline-popup-container {
    margin: 20px;
}

.newline-pos-bottom-right {
    justify-content: flex-end;
    align-items: flex-end;
}
.newline-pos-bottom-right .newline-popup-container {
    margin: 20px;
}


/* Overlay */
.newline-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Background color set inline via PHP */
}

/* Container */
.newline-popup-container {
    position: relative;
    z-index: 100000;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Close Button */
.newline-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: white;
    z-index: 100001;
    padding: 0;
}

.newline-popup-close:hover {
    color: #000;
}

/* Content */
.newline-popup-content {
    /* Styles for content inside */
}
.newline-popup-content img {
    max-width: 100%;
    height: auto;
}

/* Animations */
.newline-anim-fade .newline-popup-container {
    animation: newlineFadeIn 0.5s;
}

@keyframes newlineFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.newline-anim-slide .newline-popup-container {
    animation: newlineSlideIn 0.5s;
}

@keyframes newlineSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .newline-popup-container {
        width: 90% !important; /* Force width on mobile */
        max-width: 90% !important;
        margin: 0 auto;
    }
}

