/* Page Popup - Frontend Styles */
.page-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.page-popup-container {
    position: relative;
    background: transparent;
    max-width: 95vw;
    max-height: 95vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.page-popup-overlay.active .page-popup-container {
    transform: scale(1);
}

.page-popup-close {
    position: absolute;
    top: -35px;
    right: 0;
    width: 30px;
    height: 30px;
    background: transparent;
    color: #ffffff;
    border: none;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    padding: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.page-popup-close:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.page-popup-content {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Forzar a que el contenido interno (de Elementor, Gutenberg, etc.) ocupe todo y no genere scroll */
.page-popup-content > * {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.page-popup-content img,
.page-popup-content video,
.page-popup-content iframe {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Bloquear scroll del body cuando el popup esté abierto */
body.page-popup-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .page-popup-container {
        width: 95vw !important;
        height: auto !important;
        max-height: 90vh;
    }

    .page-popup-close {
        top: -30px;
        right: 5px;
    }
}
