/* Hide the section by default and style it as a modal overlay */
.buen-fin-modal-section {
    display: none !important; /* Hidden initially */
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 99999 !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 20px;
}

/* Adjust for admin bar if present */
body.admin-bar .buen-fin-modal-section {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)) !important;
}
@media screen and (max-width: 782px) {
    body.admin-bar .buen-fin-modal-section {
        top: 46px;
        height: calc(100vh - 46px) !important;
    }
}

/* When active, show as flex */
.buen-fin-modal-section.is-active {
    display: flex !important;
}

/* Modal content container (Elementor's inner container) */
.buen-fin-modal-section > .e-con-inner {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Close button (added via JS) */
.buen-fin-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    line-height: 1;
    padding: 5px;
    z-index: 10;
}
.buen-fin-modal-close:hover {
    color: #e52522; /* Rojo queclink */
}
