#custom-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease-out;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#custom-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

#custom-modal-overlay .custom-modal {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 28px 22px 20px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

#custom-modal-overlay .custom-modal-title {
    font-size: 18px;
    font-weight: 500;
    color: #212121;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.4;
}

#custom-modal-overlay .custom-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#custom-modal-overlay .custom-modal-buttons .cm-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.18s ease;
    outline: none;
}

/* Primary (OK) */
#custom-modal-overlay .cm-btn-primary {
    background-color: #1976d2;
    color: #ffffff;
}
#custom-modal-overlay .cm-btn-primary:hover {
    background-color: #125ca4;
}
#custom-modal-overlay .cm-btn-primary:active {
    transform: scale(0.98);
}

/* Danger (Delete) */
#custom-modal-overlay .cm-btn-danger {
    background-color: #ffebee;
    color: #d32f2f;
    border-color: #ffcdd2;
}
#custom-modal-overlay .cm-btn-danger:hover {
    background-color: #ffcdd2;
}
#custom-modal-overlay .cm-btn-danger:active {
    transform: scale(0.98);
}

/* Secondary (Cancel / Neutral) */
#custom-modal-overlay .cm-btn-secondary {
    background-color: #ffffff;
    color: #424242;
    border-color: #e0e0e0;
}
#custom-modal-overlay .cm-btn-secondary:hover {
    background-color: #f5f5f5;
}
#custom-modal-overlay .cm-btn-secondary:active {
    transform: scale(0.98);
}

/* Info (generic informative actions) */
#custom-modal-overlay .cm-btn-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border-color: #bbdefb;
}
#custom-modal-overlay .cm-btn-info:hover {
    background-color: #bbdefb;
}
#custom-modal-overlay .cm-btn-info:active {
    transform: scale(0.98);
}

/* Success (Activate / positive actions) */
#custom-modal-overlay .cm-btn-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}
#custom-modal-overlay .cm-btn-success:hover {
    background-color: #c8e6c9;
}
#custom-modal-overlay .cm-btn-success:active {
    transform: scale(0.98);
}
