/**
 * EDR² Forms Manager - Universal Modal Styles
 */

#cfm-universal-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.75) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999999 !important; /* Higher than WP admin bar */
    display: flex !important;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cfm-universal-modal.cfm-modal-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

#cfm-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#cfm-universal-modal.cfm-modal-visible #cfm-modal-content {
    transform: scale(1);
}

.cfm-spinner {
    animation: cfm-spin 1s linear infinite;
    color: #007bff;
    margin: 0 auto 20px;
}

@keyframes cfm-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#cfm-modal-title {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
}

#cfm-modal-message {
    margin: 0 0 25px;
    font-size: 16px;
    line-height: 1.5;
    color: #555;
}

#cfm-modal-close {
    background: #007bff;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
}

#cfm-modal-close:hover {
    background: #0056b3;
}

/* Dark mode compatibility for admin */
.settings_page_cfm #cfm-modal-content,
.cfm_submission_page_cfm-view-entry #cfm-modal-content {
    background: #fff;
    color: #333;
}
