/* Popup Overlay/Wrapper */
.reallimp-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.reallimp-popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.reallimp-popup-wrapper {
    position: relative;
    max-width: 90%;
    width: 650px;
    background: transparent;
    /* Container has bg */
    animation: reallimp-popup-fadein 0.5s ease;
}

@keyframes reallimp-popup-fadein {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.reallimp-popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #fff;
    color: #333;
    border: 2px solid #333;
    border-radius: 50%;
    font-size: 20px;
    line-height: 26px;
    /* Center 'x' vertically */
    text-align: center;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reallimp-popup-close:hover {
    background: #f0f0f0;
}

/* User's Original CSS (Slightly modified to scope) */
#popup-reallimp-container {
    display: flex;
    align-items: stretch;
    background-color: #fff;
    border-radius: 12px;
    /* moved from user's inline style on <a> */
    overflow: hidden;
    /* moved from user's inline style on <a> */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    /* moved from user's inline style on <a> */
}

.reallimp-popup-link {
    text-decoration: none;
    display: block;
    color: inherit;
}

.popup-reallimp-imagem {
    width: 40%;
    background-size: cover;
    background-position: center;
    min-height: 200px;
    /* Ensure visibility if empty */
}

.popup-reallimp-conteudo {
    width: 60%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: #333;
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 600px) {
    #popup-reallimp-container {
        flex-direction: column;
    }

    .popup-reallimp-imagem,
    .popup-reallimp-conteudo {
        width: 100%;
    }

    .popup-reallimp-imagem {
        order: -1;
        height: 180px;
        /* Adjusted height for mobile */
        background-position: center 33%;
    }

    .popup-reallimp-conteudo {
        padding: 20px;
    }

    .popup-reallimp-conteudo h2 {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }

    .popup-reallimp-conteudo p {
        font-size: 15px !important;
        margin-bottom: 20px !important;
    }

    /* Mobile close button adjustment */
    .reallimp-popup-close {
        top: -10px;
        right: -5px;
    }
}

/* CRO: Pulse Animation for CTA */
@keyframes reallimp-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.reallimp-cta-button {
    animation: reallimp-pulse 2s infinite;
}