/* UNIVERSAL OVERLAY - Works on Body or inside Modals */
.kk-dl-modal-overlay {
    display: none; /* Controlled by jQuery fadeIn/fadeOut */
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    
    /* This handles the centering perfectly every time */
    align-items: center;
    justify-content: center;
}

/* NESTED OVERLAY - Changes behavior only when inside a Research Modal */
.modal-content .kk-dl-modal-overlay {
    position: absolute; /* Relative to the research box */
    background: rgba(0, 0, 0, 0.4);
    border-radius: 0.4rem;
}

/* Ensure the inner content box stays centered */
.kk-dl-modal-content {
    margin: auto;
    position: relative;
    /* Add your specific KNC styles here so they don't rely on the #knc parent */
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}
.kk-dl-modal-content input {
    width: 100%;
    margin: 15px 0;
    padding: 10px;
}
.kk-dl-modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
