/* Popup Overlay */
#pxp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    background-color: rgba(0, 0, 0, 0.5);
    /* Default fallback */
}

/* Popup Container */
#pxp-popup {
    position: fixed;
    z-index: 99999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Close Button */
#pxp-popup .pxp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    padding: 0;
    z-index: 100;
}

/* Content & Grid */
#pxp-popup .pxp-content {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on mobile */
}

/* Columns */
.pxp-col {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 200px;
    /* Minimum height for bg visibility */
}

.pxp-col-inner {
    padding: 20px;
    position: relative;
    z-index: 2;
    /* Ensure content is above background */
    height: 100%;
    box-sizing: border-box;
}

/* Layout Utilities */
.pxp-layout-1_col .pxp-col {
    flex: 0 0 100%;
}

.pxp-layout-2_col .pxp-col {
    flex: 0 0 50%;
}

.pxp-layout-3_col .pxp-col {
    flex: 0 0 33.333%;
}

/* Content Elements Responsiveness */
.pxp-content img,
.pxp-content video,
.pxp-content iframe {
    max-width: 100%;
    height: auto;
}

/* Positions */
.pxp-position-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pxp-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.pxp-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

/* Animations */
/* Fade */
.pxp-animation-fade {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pxp-animation-fade.pxp-show {
    opacity: 1;
}

/* Slide */
.pxp-animation-slide {
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.pxp-position-center.pxp-animation-slide {
    transform: translate(-50%, -40%);
    /* Start slightly lower */
}

.pxp-animation-slide.pxp-show {
    transform: translateY(0);
    opacity: 1;
}

.pxp-position-center.pxp-animation-slide.pxp-show {
    transform: translate(-50%, -50%);
}

/* Zoom */
.pxp-animation-zoom {
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.pxp-position-center.pxp-animation-zoom {
    transform: translate(-50%, -50%) scale(0.8);
}

.pxp-animation-zoom.pxp-show {
    transform: scale(1);
    opacity: 1;
}

.pxp-position-center.pxp-animation-zoom.pxp-show {
    transform: translate(-50%, -50%) scale(1);
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    #pxp-popup {
        width: 90% !important;
        left: 5% !important;
        right: 5% !important;
        bottom: 5% !important;
        top: auto !important;
        transform: none !important;
    }

    .pxp-position-center {
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
    }

    /* Stack Columns */
    .pxp-layout-2_col .pxp-col,
    .pxp-layout-3_col .pxp-col {
        flex: 0 0 100%;
    }
}